Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Neon consumes too much memory (UseG1GC)
Neon consumes too much memory (UseG1GC) [message #1746419] Fri, 28 October 2016 08:58
Eclipse UserFriend
I've recently upgraded from Eclipse Mars to Neon (using J2EE package, Windows 7 64, Java 8, 32 bits; my RAM: 6GB), and I have been troubled with the memory usage.

Leaving aside the utterly terrible performance (nothing new) of the "validators" (all suspended). Leaving aside also the higher memory requirements of Java 8 (I had been using it in Eclipse Mars), I've noticed that "Search in files" uses much memory, instantly increasing the allocated heap from 300Mb to my maximum 1024M. Some time after this, Windows starts warning about low memory .

All this happens systematically.
And this didn't happen (at all) with Eclipse Mars.

After some investigation, I found out that the problem disappeared after I turned off the +XX:UseG1GC setting in eclipse.ini.
Reading the docs, http://www.oracle.com/technetwork/tutorials/tutorials-1876574.html I see that this option is recommended for "heap sizes of around 6GB". I think that very few Eclipse users need such heap sizes.

----

Some details:
My workspace has a pair of webapps consisting of 4 projects, about 1200 Java files and 200 xml files (about 8Mb total).
After doing a fresh start (`-Xms384m -Xmx1024m`) and a clean+build, my heap usage is 150/384M - which looks fine.

Things don't change much when I do a few of the usual things: navigate the Project Explorer, open some Java class (including completion to look for Java files), edit, compile with errors, open some xml resource (again, with completion, so that Eclipse must look for all files), run some main method, run some Junit tests (even stepping in Debug mode), find references to some method... Used memory in heap fluctuates around 120 to 320M/384M.
Now, I do a single (any) text search over my *.java and *.xml files ("Search in Files").,, and the memory jumps to 300/1024M. This happens ALWAYS. Why would a file search over 8Mb of textual data want to allocate almost 1GB? No idea.

What I know is that the problem completely disappears after turning off +UseG1GC .

Perhaps the Eclipse develoment teamn should consider turning this option off , and also investigate why "Search in Files" tends to consume so much memory.

[Updated on: Fri, 28 October 2016 09:05] by Moderator

Previous Topic:GTK 3.22 Breaking Eclipse UI?
Next Topic:Is it possible to add handler before "Save all" is performed ?
Goto Forum:
  


Current Time: Fri Mar 28 12:57:18 EDT 2025

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

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

Back to the top