Thursday, January 08, 2009

JVM GC tuning experiement

got a lot of useful tips from http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html, but really need to try it before believe in it :)

I just did the load testing by 60 user load based on different JVM Heap size settings, here is the result with different JVM Metrics:

Heap size(Eden size/ total Heap size) Full GC Frequency JVM throughput Throughput measured by JMeter Max pause time(Full GC time cost)
100m/1024m Full GC every 7 mins 96.71% 27.42 2.01s
256m/1024m Full GC every 20 mins 97.62% 28.69 1.91s
512m/1280m Full GC every 1 hour(defualt GC interval) 98.25% 29.46 1.92s

The table bellowing shows the difference from response time perspective under different JVM Heap size settings:

Heap size(Eden size/ total Heap size) 100m/1024m 256m/1024m 512m/1280m
action1 520ms 449ms 424ms
action2 474ms 416ms 378ms
action3 746ms 639ms 567ms
action4 1345ms 1227ms 1193ms
action5 1219ms 1100ms 1079ms

In general, we can see the different JVM heap size settings will impact our application performance, we mainly want to minimize both max pause time and its (Full)GC frequency on JVM.
this time we simply enlarge our Eden space(AKA Young generation size) and total Heap size respectively;
We will have a further looking at this spot when we have time…

No comments:

Post a Comment