goody wrote
> All my research into the subject shows that CMS *properly tuned* is still
> the better performing gc option - though I understand there are different
> goals when tuning for gc (say if shorter young gen gc pauses are desired
> over throughput) - which G1GC would win out on. Performance tests show
> that while G1GC does have avg shorter newgen pauses over CMS, the
> difference is negligible ( a few ms).  The problem here is that G1 does a
> LOT more young gen pauses than CMS, so overall GC pauses for G1 is a much
> greater cumulative.  

I looked over your blog post, and your research into G1 seems to start with
some really bad assumptions - namely that you are setting explicit new size
values with G1. This effectively hobbles most of the tuning that G1 will do
dynamically and I'm not surprised to see that you are getting bad results
with G1 when you try to tune it that way. 

I have personally had _far better_ success with G1 tuning than CMS tuning.
In general, G1 requires far less tuning out of the box than CMS to get good
performance.

For long running services, CMS will also be far more likely to have
unacceptable pauses because it does not compact its old gen heap. It's not a
matter of "if" you see a "ConcurrentModeFailure" but "when" - with tuning
you can make them less frequent, but all it takes is a period of unusually
high object allocations and your application will suddenly be paused for 1-2
seconds. 

If you have heap to spare, G1 can absolutely be better performing than CMS
or even the Parallel collector - I've seen G1 collect 32 GB of heap with a
sub 100ms pause time before. When an entire G1 heap region is unreferenced,
G1 can clean up massive swaths of memory for free basically. Many
applications that have caches that time out over time (such as something
like artifactory) will benefit from letting things age out. 

I can't speak to why artifactory set it to the default collector, but I
agree entirely with their decision to do so. It's far more likely to work
reliably without the need for specific tuning across a wide variety of use
cases than any of the other collectors. 

you can check out:
http://www.infoq.com/articles/G1-One-Garbage-Collector-To-Rule-Them-All and
http://www.infoq.com/articles/tuning-tips-G1-GC for some good information on
G1 and some guidelines on how to tune it (should you ever need to - but in
my experience you rarely need to tune it)



--
View this message in context: 
http://forums.jfrog.org/Artifactory-3-0-4-performance-tuning-and-G1GC-vs-CMS-tp7579846p7579877.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to