Thin vs. Unicorn Performance Benchmark
Thin, as I’ve mentioned in previous posts, is a very fast Ruby web server. Unicorn came a bit after and had some buzz associated with its arrival. Recently Twitter adopted it, so it’s a worthy opponent to the already established Thin web server.
Setup, test and configuration
Thin’s version and configuration were already stated in my previous 2 posts. As for Unicorn, you can find it’s configuration here. As you can see, it is pretty similar to Thin’s. This is very important to make this benchmark reasonably reliable.
Once again, the used proxy server was Nginx with the previously shown configurations. The test pages were also the same, just like Nginx’s version. The Unicorn version used was 0.97.0.
Results

Conclusions
Unicorn’s performance is very similar to Thin’s. Thin was ~2% faster (in total) while using less memory (around 38MB of difference) so it’s still a bit better than Unicorn for the considered platform. These 2%/38MB should not, however, be a performance bottleneck for any system. There are many more important things to optimize before coming to these little details.