java applications taking up too much memory

Ask a Question related to FreeBSD, Design and Development.

  1. #1

    Default java applications taking up too much memory

    Hello,
    It seems that my java applications are taking up a ton of memory. Even
    one small jar that I start at startup takes up almost 200 MB!

    I start it like this:
    java -Xms4m -Xmx8m -jar /home/brian/serverWatcher/serverwatcher.jar &
    and it looks like this in top:
    76750 brian 20 0 159M 10840K kserel 0:03 0.00% 0.00% java

    I start Azureus like this:
    azureus -Xmx128m
    and it looks like this in top:
    59636 brian 20 0 503M 228M kserel 2:37 0.00% 0.00% java

    I only have 512M of memory on this machine. Does anyone have any idea
    how I can make these apps take up less memory?

    Thanks

    /Brian
    Brian John Guest

  2. Similar Questions and Discussions

    1. Running Java applications with CF applications
      Is anyone out there running both Java and CF apps on their CFMX 7 J2EE Enterprise Server? I was going to migrate the Java apps to CF7 to avoid a...
    2. web applications versus. web portal applications
      I came across a new term "web portal applications." Anyone can tell me what's the differences between web portal applications versus traditional...
    3. #19327 [Fbk->NoF]: java.lang.UnsatisfiedLinkError: no php_java in java.library.path
      ID: 19327 Updated by: sniper@php.net Reported By: chregu@php.net -Status: Feedback +Status: No...
    4. default fonts for java applications?
      I'm running ImageJ (http://rsb.info.nih.gov/ij/) using Sun's J2SE v 1.4.2, installed from j2sdk-1.4.2-nb-3.5-bin-linux.bin. When I start the...
    5. Difference in module_eval taking block vs. taking string (1.8 bug?)
      The following code: class Klass end p Klass.instance_methods(false) Klass.module_eval do def hello puts 'hello' end end
  3. #2

    Default RE: java applications taking up too much memory

    Hi Brian,

    First you should ask on the freebsd java mailing list, not here.

    Second, 200MB of ram isn't that big anymore these days for a server,
    you might consider your system needs more? Java isn't know for small
    programs. Java's strength is it's write-once, run-anywhere feature,
    and as a result it's going to be much more resource consumptive than
    a compiled C program.

    Last, most of this will probably be swapped out, so what you want to
    pay attention to in top is the Swap: line. When your app starts, you
    should see swap loaded up - what you should be concerned with is if
    you see a lot of in-and-out on the ram allocated, also you might try
    running

    systat -vmstat

    you will get a better idea of what your system is doing that way
    rather than just looking at top's output.

    Ted
    > -----Original Message-----
    > From: [email]owner-freebsd-questions@freebsd.org[/email]
    > [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Brian John
    > Sent: Tuesday, February 22, 2005 5:47 PM
    > To: [email]freebsd-questions@freebsd.org[/email]
    > Subject: java applications taking up too much memory
    >
    >
    > Hello,
    > It seems that my java applications are taking up a ton of
    > memory. Even
    > one small jar that I start at startup takes up almost 200 MB!
    >
    > I start it like this:
    > java -Xms4m -Xmx8m -jar /home/brian/serverWatcher/serverwatcher.jar &
    > and it looks like this in top:
    > 76750 brian 20 0 159M 10840K kserel 0:03 0.00% 0.00% java
    >
    > I start Azureus like this:
    > azureus -Xmx128m
    > and it looks like this in top:
    > 59636 brian 20 0 503M 228M kserel 2:37 0.00% 0.00% java
    >
    > I only have 512M of memory on this machine. Does anyone have any idea
    > how I can make these apps take up less memory?
    >
    > Thanks
    >
    > /Brian
    > _______________________________________________
    > [email]freebsd-questions@freebsd.org[/email] mailing list
    > [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
    > To unsubscribe, send any mail to
    > "freebsd-questions-unsubscribe@freebsd.org"
    >
    Ted Mittelstaedt Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139