-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Decreased performance between JRuby 1.7 and 9.1 #3973
Comments
Hi JRuby team, I thought it might be mentioning that we've seen the Mongoid test suite execute much slower and use much more memory on JRuby-9.1 as well. Previously, on 9.0 it would complete in about 4 minutes: On 1.7 it would take even less time: and now it takes much longer before running out of memory: I haven't spent much time debugging so please let me know if I can provide some more useful info. |
@estolfo are you sure that relates to the reported issue (@dlhainer using mongoid)? |
@dlhaines that sounds like the jruby-openssl leak we stumbled on recently please try an upgrade (0.9.17) |
That does look like the issue. Are there instructions on how to do that kind of upgrade in the jruby environment? |
@kares Sure, I have to investigate some more in order to open a more specific issue but I thought it would be of interest to show an example of the vast difference in execution times between our test suite on 9.1 versus 9.0. |
@dlhaines I think I told you how on irc last week but if not install jruby-openssl gem. It should not have this large memory footprint. |
@estolfo Something else is amiss here since you run out of memory. I would be mildly surprised if anything is slower since 9.0 -> 9.1 since we made so many performance improvements. With that said, you issues is probably more about non-warmed up code which has had less done (although I would not expect it to be slower). |
@estolfo although I do believe you. I was just mentioning that it was surprising to me. |
I agree that something is amiss. Our Travis CI builds show that performance is consistent on MRI: https://travis-ci.org/mongodb/mongoid/builds/140526206 From the stacktrace, it seems to run out of memory when the Ruby driver tries to create a new thread to monitor a server. If you have any ideas as to why this is happening, let me know! |
@estolfo Looking at your travis logs, one of the first things that jumped out as me was It seems likely that you are hitting the same OpenSSL memory problem that @dlhaines claimed fixed his issue. You may want to try to set the mongoid runs on JRuby to install the most recent If not, I'd like you to open a new bug, since @dlhaines has confirmed his issue was fixed by updating jruby-openssl. You might also try adding to |
Fixed by jruby/jruby-openssl#94. |
Apache Tomcat Version 7.0.69
jruby 9.1.0.0 (2.3.0) 2016-05-02 a633c63
Java HotSpot(TM) 64-Bit Server VM 25.91-b14 on 1.8.0_91-b14 +jit [linux-x86_64](Packaged by Warbler)
JVM settings are:
-XX:InitialHeapSize=2147483648 -XX:+ManagementServer -XX:MaxHeapSize=2147483648 -XX:MaxNewSize=536870912 -XX:NewSize=536870912 -XX:+PrintAdaptiveSizePolicy -XX:+PrintClassHistogram -XX:+PrintCommandLineFlags -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintStringDeduplicationStatistics -XX:+PrintTenuringDistribution -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC
We are using Sinatra as the framework.
Expected Behavior
Under JRuby 1.7.18 with about 748M of heap we get:
Actual Behavior
Under JRuby 9.1.0.0 with 2G of heap we get:
increases. This happens with default GC settings and with G1.
Attached are PDF with graphs of the behavior.
After we stopped our test we got a 2G heap dump that shows a retained size of 1.3 G with about 1/2 of that retained by org.jruby.ext.openssl.X509Store. Off the top of my head that seems large. Any suggestions on how to look deeper at the dump would be welcome.
Application GC with JRuby 1.7
Dash Ramp 2.1-1.7.pdf
Application GC with JRuby 9.1
Dash Ramp 2.1-9.1.pdf
The text was updated successfully, but these errors were encountered: