-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak ENV vars for optimal JRuby performance #93
Comments
That sounds useful. Any thoughts on where they should go in the code? |
Maybe create a |
Sounds reasonable. Or how about if we provide a hook, something like this:
That way you could keep this stuff tucked away in a file of it's own (still inside aruba's source, required by default). WDYT? That |
That seems reasonable. |
@myronmarston let me know what you think of the code in that branch and if it's good I'll merge it in. |
Merged into master |
(Thanks @myronmarston) |
@myronmarston, @mattwynne: What do you think about merging any currently setup |
@alindeman that makes sense to me, if that's not already the behavior. This issue was a while ago so I had mostly forgotten about it. |
Gotcha! I ran into it while trying to test rspec under jruby-19mode. In JRuby 1.6, you pass Pull request is #125. |
As most people know, JRuby suffers from slow startup times even though it performs very well over the lifetime of a long-lived process. Unfortunately, when you use aruba to test a command line tool on multiple ruby interpreters, including JRuby, you wind up with really, really slow performance on JRuby since the startup times are so bad and aruba is constantly shelling out to create new jruby processes.
There are a few ENV vars that most people aren't aware of that make a big difference:
JRUBY_OPTS=-X-C
disables the JIT, which is good for short lived scriptsJAVA_OPTS=-d32
forces it to use the client JVM which has better startup times than the server JVMI got both of these settings from this blog post for those who are interested.
I just set these variables for rspec-core and it cut 10 minutes off of the build time. It allows us to build rspec-core on travis using JRuby.
We can change this for all the other rspec repos as well...but it got me thinking: why not put these settings directly into aruba itself? Not many people know about them, and given the short-lived nature of the processes aruba starts, I can't imagine a time when you wouldn't want them.
Thoughts?
The text was updated successfully, but these errors were encountered: