I occasionally run eclipse tasks that require a very large amount of memory. So jvm while the task runs swallows about 2-3 GB of RAM, this is normal. But as soon as jvm took this memory, it did not release it, and I have a situation where the used memory on the heap is about 200 MB with a total heap size of about 3 GB, and this is really undesirable, as other programs are starving for memory.
I tried the Max/MinHeapFreeRatio
to force jvm to reduce the consumption of unused memory. This is my eclipse config.ini
file:
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502 -vm c:/Program Files/Java/jdk1.6.0_26/bin/javaw.exe -showlocation -product org.eclipse.epp.package.jee.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Duser.name=Michael Nesterenko -Dosgi.requiredJavaVersion=1.5 -Xms512m -Xmx4096m -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=30
But this does not help, I still have situations where there is a lot of unused memory.
source share