Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The default choice of garbage collector in Hotspot is the throughput collector, which is ... entirely optimized for throughput

I just want to confirm this is true? Say you're doing a long running simulation. You don't care about pauses at all. You just want it to finish fast. The default GC with no particular options is the way to go?



Well, to not answer your question: Hotspot performance tuning is a fine art, and benchmarking is a somewhat separate fine art, people will sample their data carefully, do a lot fo runs, warming up properly, using different GC's, tuning heap,GC generations, MaxInlineSize, maybe 32-bit (-server). I remember reading linux package managers often don't include -client in the 64-bit install. JDK7 maybe faster, many people have said no difference between sun/Oracle and openJDK (except launcher and fonts, for IDEA, you must have sunjdk), and in some cases JRockit performs more predictably.

Here's some blogs that i like about this:

http://openjdk.java.net/groups/hotspot/docs/RuntimeOverview....

http://q-redux.blogspot.com/search/label/all%20jvm%20options

http://redstack.wordpress.com/2010/12/09/recommended-jvm-par...

http://marxsoftware.blogspot.com/2011/10/javaone-2011-defini...

http://blog.headius.com/2009/01/my-favorite-hotspot-jvm-flag...

http://groups.google.com/group/jvm-languages/browse_thread/t...

http://stackoverflow.com/questions/tagged/java+hotspot?sort=...


I'd say, odd are, that if you're just interested in throughput, the standard Hotspot GC without any options isn't going to give you optimal performance. I've found that, like gtani, mentions you'll have to spend time tuning to get the performance you want.

In a similar situation, I found that the Parallel Old was, by far, the fastest (throughput) collector.


I'd say low fruit are -server, Xmx, Xms and MaxInlineSize and looking for boxing/unboxing. At the other extreme, is it worth it to your company to spend a few weeks reading the Hunt/John book and benchmarking thoroughly?


Interesting. I've definitely looked for & removed boxing/unboxing. I haven't touched MaxInlineSize tho.

What performance improvements/degradations have you seen in altering MaxInlineSize?


This is a quite excellent brain dump from a Twitter software engineer. Highly recommended: http://www.slideshare.net/aszegedi/everything-i-ever-learned...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: