It's becoming more and more apparent to me that HotSpot's defaults, 
while probably great for typical Java applications, are not so great for 
e.g. dynamic languages running on the JVM. I think it's time that all 
the various dynlang implementers pool their shared knowledge of what 
flags need to be tweaked for better performance, so we can form a better 
picture of what a fast dynlang hotspot should be.

I'll start.

The most recent discovery for us is that -XX:NewRatio=1 performs better 
than the default 2 on server and 8 on client VMs. Because Ruby is as a 
rule a lot more object-intensive (having no unboxed numeric types, for 
example) we really do need a larger young generation. Once transient 
objects get promoted to older generations the game is over; we're 
spending all our time collecting Fixnums instead of working.

I posted this to hotspot-dev (Paul Hohensee answered but redirected me 
to hotspot-gc-use) and was told to also consider two additional flags 
that give the young generation more wiggle room:

MaxTenuringThreshold=0-15 ; the number of times an object must survive 
young gen collections to be promoted; not sure about defaults on client 
and server or across collectors

SurvivorRatio ; Lower values increase the size of the survivor space, 
allowing more objects to "just die" in the young generation instead of 
being promoted.

I have not tried either of these yet. Anyone else? Any other flags or 
defaults you've found helpful for performance in your dynlang apps?

Here's another from me, which I've posted about previously: 
-XX:bootclasspath and friends. JRuby is a Ruby implementation, which 
means it needs to perform reasonably well as a command-line tool. 
Typical JVM startup precludes fast command-line startup, but it turns 
out a large portion of that time is spent verifying bytecode. 
bootclasspath allows JRuby and its dependencies to skip verification, 
which in our case improved startup time almost 3X, putting it 
comfortably under 0.5s on OS X. That was a *huge* find, akin to a silver 
bullet for startup speed.

- Cahrlie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to jvm-languages@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to