Coding and stuff

Thin on JRuby

by Tim Felgentreff ,

After much work from Wayne Meissner and myself I have managed to get the Thin webserver running on JRuby. It actually loaded for a couple of weeks or so already, but only recently stopped crashing when receiving a request. Today I have managed to get it to serve pages as well, so I guess it’s time for some speed checking :)

The tests are just quickly done using ab and were run on REE 2010.02, JRuby Head on the cext branch and Rubinius 1.0.0-20100514. I did 1000 requests at different concurrency levels and checked the average req/s.

The numbers

concurrency REE JRuby Rubinius
1 3102 298 214
11 3563 521 544
21 4836 584 754
31 3402 668 728
41 5056 686 486
51 4025 672 797
61 5427 1046 704
71 3874 1080 736
81 5249 947 685
91 3919 678 579


As we can see, JRuby starts something like 15x slower than REE and only recovers to about 4 times slower with a concurrency of 71. It is generally faster than Rubinius, though. This is not a fair comparison, though, as JRuby has a Java implementation of EventMachine.

Apart from that, overall coverage of the C API specs is getting better, too. Currently out of the 348 examples, 26 fail and 110 throw errors. Failures are mostly incomplete implementations of Ruby functions, errors are almost exclusively missing functions.


This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Germany License. Any source code included is, unless stated otherwise, licensed under a MIT License. This does not apply for comments (below).