Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java: New Generation Used 100%, Eden Space Used 100%, From Space Used 100%

jmap -heap gives me output that says:

New Generation Used 100%, Eden Space Used 100%, From Space Used 100%, To Space Used: 0%, Perm Generation Used: 38%

Is this 100% of New, Eden, From space - a problem?

My JAVA OPTS are: -Xms10240m -Xmx14336m -XX:PermSize=192m -XX:MaxPermSize=256m -XX:NewSize=8192m -XX:MaxNewSize=8192m -XX:-DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=60

I see a lot of quick Garbage Collection. But no memory leaks using tools like JConsole

The Memory Usage can be seen here: http://tinypic.com/view.php?pic=wo213&s=6

JDK 1.6 is in use.

like image 734
Jasper Avatar asked Jun 28 '12 13:06

Jasper


2 Answers

Well that is how generational collection works. You have young space (eden, from, to) and old space (tenure, perm). Young space is smaller. Once young space is full (your case) - thing called minor GC (young GC) is happening.

But minor GC should be quick. Once old space is full full GC is happening (which is more time consuming).

Idea is to have more frequent fast minor GCs and much less frequent full GCs.

You can read much more detailed explanation in this article

like image 148
Alexey Ragozin Avatar answered Sep 28 '22 07:09

Alexey Ragozin


I have found the following two commands very useful

jstat -gc

or

jstat -gcutil
like image 27
Nikem Avatar answered Sep 28 '22 08:09

Nikem