Java: New Generation Used 100%, Eden Space Used 100%, From Space Used 100%
Asked Answered
C

3

6

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.

Colemancolemanite answered 28/6, 2012 at 13:12 Comment(3)
Are you experiencing problems in your software?Brocket
Application is being reported occasionally as slow. Overall memory usage is fine though, well below max memory. But New Gen, Eden etc. if often close to 100%. Could that be the issue?Colemancolemanite
New Gen and Eden being full may trigger a lot of fast GCs. Check that out with jstat, and if there are too many GCs you may want to increase Eden and/or NewGen space. It will be a trial and error process, though, to find your optimal configuration.Darr
T
7

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

Taught answered 29/6, 2012 at 3:18 Comment(0)
E
3

I have found the following two commands very useful

jstat -gc

or

jstat -gcutil
Erikerika answered 28/6, 2012 at 14:23 Comment(0)
P
-1

Might be prudent to also check for memory leaks. Use visualVM or some other tool (e.g. Eckipse memory analyzer) and attach it to the process.

Once you know what is leaking, you can find what is holding references to the objects, such as

jmap -dump:live,file=heap.dump.out,format=b <pid>

jhat heap.dump.out

Also, just wondering, what JVM version is this, the parameters you've passed for GC etc.

Proxy answered 28/6, 2012 at 14:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.