GC algorithms
Charlie Hunt
chunt at salesforce.com
Mon Mar 18 06:57:54 PDT 2013
Hi Luke,
If you are ok with the worst case pause time with parallel GC, then you will get the best throughput and lowest latency with it.
CMS will have slightly higher minor GC times for the same size young gen. But you may be to avoid full GCs by tuning the (mostly) concurrent old gen collector. CMS will also require a little larger Java heap than Parallel GC.
G1 is a bit of a different game. With G1 you should focus on what is the worst case pause time you can deal with and set that as the G1's pause time to try to meet. G1 is adaptable so you should not size young gen. I have also seen folks trying to compare minor GC pause times of G1 minor GC pause times. IMO, that's not a good comparison since G1 uses additional data structures to support adaptiveness and your goal is to meet a worst case pause time, not comparing minor GC times for the same sized young gen.
Given your interest in GCs, you might find value in getting a copy of Java Performance. It has a GC overview section in one chapter and a full chapter on tuning the JVM step by step.
hths,
Charlie
Sent from my iPhone
On Mar 18, 2013, at 5:32 AM, "luke" <luke.bike at gmail.com<mailto:luke.bike at gmail.com>> wrote:
Thanks Bernd, Ryan
I'm working on webApp hosted on Jboss AS (java6), that invoke an heavy batch job.
So I'm mainly interested in throughput.
Application is working on multi cpu servers and when my application is running, I've only few GB of phisical memory available (3-4 GB).
We started with -Xms1g -Xmx3g and performance was very bad.
So we passed to -Xms6g -Xmx6g and we set Parallel algorithm for young and old generations.
Using these jvm triggers application works quite well with current data. Maybe in future I've to try other improvment in order to deal with data greater than now.
I'll try with low pause GC and G1 to compare performance with parallel algorihm.
Thanks for your suggestions,
luca
2013/3/17 Bernd Eckenfels <bernd.eckenfels at googlemail.com<mailto:bernd.eckenfels at googlemail.com>>
Hello,
Am 17.03.2013 um 12:54 schrieb luke <luke.bike at gmail.com<mailto:luke.bike at gmail.com>>:
> I have to improve performance on an application running on
You first need to specify what performance improvements mean (more throughput, less overhead, shorter or more consisten Pause times) then you can better chose a GC strategy.
You also should device a test benchmark where you can measure if your new goals are meet.
You also need to consider different aspects and phases of your application life cycle - do they all put the same pressure on the memory?
And finally a Verbose GC log file would help to analyze your system. But with 97% throughout, there is a bit to improve, but certainly not a large breakthrough.
How many Logical CPUs does your Server have, how many RAM, what is the memory footprint of the app - those are typical questions which help you with the decision.
I think there is typically only the parallel GC, the low pause GC and G1. You can try all 3. But if you not care about pause times you might have chosen the best setting already.
Bernd
_______________________________________________
hotspot-gc-use mailing list
hotspot-gc-use at openjdk.java.net<mailto:hotspot-gc-use at openjdk.java.net>
http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20130318/a00e228a/attachment-0001.html
More information about the hotspot-gc-use
mailing list