rbx is 25x+ slower than jruby when running heap dump analysis #2135

Closed
chuckremes opened this Issue Jan 29, 2013 · 4 comments

3 participants

@chuckremes
Rubinius member

I am tracking a memory leak in my app so I used rbx to dump the heap and then analyze with the heap_dump tool (analysis failed, so I opened a separate issue with that project, see here evanphx/heap_dump#1 ).

What is interesting is that the program ran for 30+ minutes before failing. While troubleshooting to see if it was a rubinius problem, I reran using jruby. It finished the same work in under 2 minutes. Clearly there is a perf problem somewhere.

rbx is e3bb300 and running in 1.9 syntax mode on OSX 10.8.2. I am not using rvm to manage my rubinius.

I have added a link to the heap_dump that I was trying to analyze. It is 26MB compressed, and 120MB uncompressed.

https://www.dropbox.com/s/izh5dkjtqhncwg6/heap.dump.zip

I am currently rerunning the heap dump analysis twice under rbx to get profiler output (flat and graph). I will update this issue with links to both when it completes. I expect it will take approximately 8 hours to produce the graphs.

EDIT:
Here's a gist with the flat and graph profiles (went faster than expected at around an hour). Looks like it's the GC at first glance.

https://gist.github.com/4667149

@brixen
Rubinius member

@chuckremes thanks for posting this and waiting for all that to run. Looks like this is the main culprit Rubinius::HeapDump::Decoder::decode<110> {} [9] and a lot of load on the young collector. I was looking at tuning it a bit under another workload recently. I'll take a look at this as well.

@stouset

@brixen Is the issue here that decode is slower than it ought to be?

@chuckremes
Rubinius member

Performance on this problem is much improved. With the latest 2.1 master (almost rc2) it finishes in just over 6m on the same machine. Something has been optimized which is good news!

I'll close this.

@chuckremes chuckremes closed this Sep 25, 2013
@brixen
Rubinius member

@chuckremes wow, nice to hear. And thanks for taking the time to run this and check!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment