Jump to content

Java + X => Huge X Memory Allocation


Recommended Posts

I am running Mandrake 10 Official...

 

I have a Java program that, well, may or may not have a memory leak in it. I'm a little overwhelmed with all the memory-related numbers: Java used and free numbers and physical vs virtual and virtual vs swap (same thing right?) and Java vs Linux numbers and all. But in any case we are running a Java program that shows a fairly steadily increasing "RSS" size in ps, at least until it consumes about 170 MB of RAM. However by doing a -verbosegc option to the VM it doesn't obviously appear to be actually using more RAM in Java.

 

In any case, at some point Linux/Java finally pages some of the Java memory out to disk or something, and the RSS size goes down to 125-150 MB. I believe it is after this that I frequently see the X process consume upwards of 80-90% of the system RAM over a period of 5 or so minutes. Then, when all free memory (as reported by cat /proc/meminfo, "MemFree" line) is exausted, and the swap starts to be allocated, X dumps a ton of RAM in less than 10 seconds and goes back to appx 150-200 MB. In a current running configuration, this periodic effect has occurred about four times now, and each time the "SwapFree" has gone down by at least several megabytes. So, I'm guessing that in the long term some memory is getting leaked, and eventually the system RAM (virtual + physical) will be exhausted.

 

Note that actually when this huge memory dump occurs, the Java process memory also decreases. So far it seems to have decreased each time X did this strange thing, and Java's usage is now down to 100 MB or so.

 

I can provide some more specific data on this if anyone thinks it would help. Anyone have a clue what might make X act so strangely?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...