Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JVM - Old Generation 99% Usage - Tomcat Crashes

843829Feb 15 2008 — edited Feb 15 2008
Hiya,

I've been having some performance issues with my java application and I have figured out what is happening but I am not sure on the best approach to resolve it.

Basically, the application caches a lot of web pages and content - so when this happens it gets put into the old generation space, as more and more people visit the website more and more content is cached, and because the garbage collector cannot free much memory during a full garbage collection it spams FGC's until the tomcat server crashes.

This leads me to think that there are two possible solutions ...

1) Increase the size of the heap and give the old generation more space to play with.
2) Decrease the amount that the jahia application caches.

The problem with the first option is that I have just upgraded my heap size from 2GB to 2.5GB, but it didnt affect the size of the old generation as you can see below. Is there a way i can specify more on the old generation? and what should the new generation be in relation to the old?

The second option is less of a java specific option, and something I will need to look into.

So to sum up, my questions are :-

1) What should the old generation and new generation ratio be?
2) How can I set the size of the old generation and the new generation?

Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 2621440000 (2500.0MB) <<<< New HEAP is 2.5G
NewSize = 655360 (0.625MB)
MaxNewSize = 4294901760 (4095.9375MB)
OldSize = 1441792 (1.375MB)
NewRatio = 8
SurvivorRatio = 8
PermSize = 16777216 (16.0MB)
MaxPermSize = 134217728 (128.0MB)

Eden Space:
capacity = 239271936 (228.1875MB)
used = 215276592 (205.3037567138672MB)
free = 23995344 (22.883743286132812MB)
89.97151759577855% used

PS Old Generation
capacity = 1908932608 (1820.5MB) <<<<<<<<<<<<< Still set to 1.8GB
used = 1604151664 (1529.8382415771484MB)
free = 304780944 (290.66175842285156MB)
84.03395998775878% used
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 14 2008
Added on Feb 15 2008
1 comment
2,255 views