Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Java Virtual Memory Usage at Eclipse startup(JAVA VM requests >8G of virtual memory at startup... makes scaling difficult)
Java Virtual Memory Usage at Eclipse startup [message #1746050] Thu, 20 October 2016 20:30 Go to next message
Steven InAz is currently offline Steven InAzFriend
Messages: 7
Registered: September 2011
Junior Member
The question I have has to do with the quantity of Virtual Memory eclipse requests at startup. I am running linux. When I take a look at "top" I see that the Java VM has requested 8G of virtual memory, and has 500k resident, an almost 20x discrepancy. This is for a stock installation of the C/C++ installation of Eclipse Neon 4.6.1, but is not specific to this Neon.

If I keep an eye on the memory usage while I am running having loaded a large project or two, I see the resident memory cap out at around 2.5G, with the virtual memory capping out around 11G, still a 4x being reserved over and above what is actually used.

Where I run into issues is when we have multiple users on a multi-core server with what should be near infinite memory. 10 users all running eclipse, has a virtual memory allocation space around 100G which makes it difficult to deploy eclipse in our current system.

The VM allocation is independent of the Eclipse.ini file (Xmx, Xmxs etc.) as covered by many other forums I have read, and verified by my own efforts to use them to tweak Eclipse at run time.

It looks like I am running Java 1.8.0_91, looks like Oracle.

Has anyone else run into the scalability issue I am describing? Were you able to do anything to fix it? I am hoping to find a VM / set of switches that is more of a lazy load.
Re: Java Virtual Memory Usage at Eclipse startup [message #1746090 is a reply to message #1746050] Fri, 21 October 2016 13:28 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
That's indeed very alarming, but it sounds to me more like a Java VM issue rather than Eclipse. Eclipse, being an ordinary resident of the JVM, can only affect the "internal" memory components it requests (heap, PermGen, etc) - basically, those things that are controlled by the options like Xmx, etc). Eclipse itself, as far as I know, has no say in how virtual memory is requested.

I know on Windows, where the JVM has had notoriously poor memory management, for example it requests a single contiguous block of memory based on the max heap size requested by the application, and that can cause problems because Windows fragments memory so much. But I've not heard of any memory allocation issues on linux.

Have you checked and general Java forums for JVM-related discussions about this?
Re: Java Virtual Memory Usage at Eclipse startup [message #1746185 is a reply to message #1746050] Mon, 24 October 2016 17:31 Go to previous messageGo to next message
Steven InAz is currently offline Steven InAzFriend
Messages: 7
Registered: September 2011
Junior Member
Eric,

The issue is definitely not an Eclipse issue as you state, I should have said so in my initial post. It appears to be a GLIBC issue.

This weekend I was pointed at the following GLIBC issue. The problem got significantly better when I set MALLOC_ARENA_MAX=4. Adding this switch (and playing around with it some) I dropped from 10G of virtual memory at startup to 4G at startup which when multiplied by number of users makes a big difference.

I hope this helps someone else going foward.

https://www.ibm.com/developerworks/community/blogs/kevgrig/entry/linux_glibc_2_10_rhel_6_malloc_may_show_excessive_virtual_memory_usage?lang=en

Steven
Re: Java Virtual Memory Usage at Eclipse startup [message #1746188 is a reply to message #1746185] Mon, 24 October 2016 18:42 Go to previous messageGo to next message
Steven InAz is currently offline Steven InAzFriend
Messages: 7
Registered: September 2011
Junior Member
I don't want to close this topic as yet. If anyone knows any other tricks to help keep Eclipse virtual memory usage down, please post them. The reality is that even with the switch above, Eclipse is still requesting a highly non-trivial amount of virtual memory at startup, especially when compared to the memory resident (5-10x).

And yes, when I say Eclipse, I realize that the issue could be anywhere from the Eclipse source code through external libraries that the Java VM uses... this is what makes this so hard to figure out.

Re: Java Virtual Memory Usage at Eclipse startup [message #1746190 is a reply to message #1746188] Mon, 24 October 2016 19:59 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
I guess that you're running a 64 bit system.

Most of the space occupied at start seems to go to the various plug-ins. Is your Eclipse with all bells & whistles and a kitchen sink?

In my Kubuntu 14.04 LTS (32 bit), the space occupied by Eclipse is:
- Luna SR2: 299 Mbyte, 24 Mbyte shared,
- Neon.1: 333 Mbyte, 38 Mbyte shared.

The Java on the Luna installation is IcedTea 2.6.7, and on the Neon installation Java SE 1.8.0_60.



--

Tauno Voipio
Previous Topic:Build not working
Next Topic:Problems Moving Project from NetBeans to Eclipse
Goto Forum:
  


Current Time: Fri Apr 19 14:42:20 GMT 2024

Powered by FUDForum. Page generated in 0.04019 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top