Čudnovati Čudaš
Čudnovati Čudaš

Reputation: 31

GC heap sizing and program memory overhead

I'm trying to figure out what's happening with my application.

Problems:

Command line used:

java -XX:+UseSerialGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -Xmx2500M -cp XXXXXX.jar xxxx.xxxx.xxxx
pause

tried with UseParNewGC, same results

System: Win7 SP1 4GB RAM + 4GB swapfile 2.99GHZ Java 1.7 + JDK 1.7

Please see picture to make things more clear: https://i.sstatic.net/i3sxw.jpg

Upvotes: 3

Views: 437

Answers (1)

ssedano
ssedano

Reputation: 8432

Rather than set free ratios, try to set the New Generation to a size that enables the short-lived objects to die. Trying to promote as few as possible to the Old Generation.

Bear in mind that larges Young Generation turns into large collections.

Then set the max Old Generation to a size that does not take too long to full GC but does not constantly runs them.

Upvotes: 1

Related Questions