{"id":317,"date":"2013-02-12T10:58:08","date_gmt":"2013-02-12T14:58:08","guid":{"rendered":"http:\/\/blog.litespeedtech.com\/?p=317"},"modified":"2013-02-12T10:58:08","modified_gmt":"2013-02-12T14:58:08","slug":"not-even-close-ruby-lsapi-4-1-bests-nginx-passenger-a-benchmark-of-course","status":"publish","type":"post","link":"https:\/\/lswp.store\/index.php\/2013\/02\/12\/not-even-close-ruby-lsapi-4-1-bests-nginx-passenger-a-benchmark-of-course\/","title":{"rendered":"Not Even Close: Ruby LSAPI 4.1 Bests Nginx + Passenger (A Benchmark, Of Course)"},"content":{"rendered":"<h3><strong id=\"internal-source-marker_0.37225096579641104\">Part 1 \u2014 Uploading<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<p>Now that we\u2019ve finished tweaking the latest <a href=\"http:\/\/www.litespeedtech.com\/lsapi-downloads.html\">update<\/a> of LiteSpeed&#8217;s SAPI for Ruby on Rails with Rack, we decided to celebrate with a little benchmarking. <!--more-->In our new version, Ruby LSAPI 4.1, we\u2019ve implemented a native rewindableinput interface. Requests in the new interface are already coded as rewindable, so Rack no longer has to expend memory caching requests to make them rewindable. This should streamline uploading to Rack applications. We wanted to see how much difference it would make. (By the way, if you\u2019re going to run LSAPI 4.1, we strongly recommend upgrading to <a href=\"http:\/\/www.litespeedtech.com\/litespeed-web-server-downloads.html\">LSWS 4.2.2<\/a>, if you haven\u2019t already.)<\/p>\n<p>We thought we\u2019d also take this chance to test drive our API against our favorite frenemy \u2014 Nginx, this time with Passenger. Nginx + Passenger is supposed to be the best high-performance option for hosting Ruby Rails Rack applications, with Passenger increasing efficiency by automatically managing the backend. We\u2019ve never benchmarked against Nginx with Passenger, so we were excited. Of course we thought our software was better, but we expected some competition. We were wrong. Here&#8217;s a quick summary of the results: (For the benchmark we used LSWS 4.2.2 with Ruby LSAPI 4.1, Nginx 1.2.6 with Passenger 3.0.19, and Ruby 1.9.3p374, Rails 3.2.11, and Rack 1.4.3.)<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.litespeedtech.com\/wp-content\/uploads\/2013\/02\/chart_2-31.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-321 aligncenter\" title=\"LiteSpeed vs. Nginx + Passenger (Upload)\" src=\"http:\/\/blog.litespeedtech.com\/wp-content\/uploads\/2013\/02\/chart_2-31.png\" alt=\"\" width=\"884\" height=\"320\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2013\/02\/chart_2-31.png 884w, https:\/\/lswp.store\/wp-content\/uploads\/2013\/02\/chart_2-31-300x109.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2013\/02\/chart_2-31-768x278.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2013\/02\/chart_2-31-600x217.png 600w\" sizes=\"(max-width: 884px) 100vw, 884px\" \/><\/a><\/p>\n<p style=\"text-align: left;\">This is a very simple benchmarking \u2014 we ran the different APIs on the same virtual machine using the same application. We used a bare bones application so that most of the pressure was on the servers. No surprisingly, the speeds diverge the most when transferring a smaller amount of data. As the amount of data grows, the app becomes the bottleneck, and the processing speed becomes comparable. This short test is not meant to mimic real life. We just wanted to see how the server software performed in comparison (under idealized, oversimplified conditions) \u2014 and LiteSpeed blew Nginx out of the water.<\/p>\n<p>We are eagerly awaiting (and hoping for) a flood of snarky criticisms. <a href=\"http:\/\/blog.litespeedtech.com\/litespeed-vs-nginx-passenger-ruby-rack-upload-benchmark-configs-and-details\/\">Here<\/a> are the configurations and detailed results for the upload benchmarking, so you can test it and see for yourself. We love talking about benchmarks, so, please, give us some feedback. (Maybe we\u2019ll even try new benchmarks if you suggest them&#8230;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part 1 \u2014 Uploading &nbsp; Now that we\u2019ve finished tweaking the latest update of LiteSpeed&#8217;s SAPI for Ruby on Rails with Rack, we decided to celebrate with a little benchmarking.<\/p>\n","protected":false},"author":1,"featured_media":413,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16,27,20],"tags":[167,196,218,242,243,255,271,294],"class_list":["post-317","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-benchmarks","category-web-server","category-performance","tag-lsapi","tag-nginx","tag-passenger","tag-rack","tag-rails","tag-ruby","tag-speed","tag-upload"],"jetpack_featured_media_url":"https:\/\/lswp.store\/wp-content\/uploads\/2013\/02\/chart_2-2.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/comments?post=317"}],"version-history":[{"count":0,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/317\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media\/413"}],"wp:attachment":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media?parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/categories?post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/tags?post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}