From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-1.0 required=3.0 tests=AWL,BAYES_00,FREEMAIL_FROM, URIBL_BLOCKED shortcircuit=no autolearn=ham version=3.3.2 X-Original-To: unicorn-public@bogomips.org Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 581581F5D9 for ; Wed, 3 Dec 2014 11:01:28 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id bj1so15560038pad.37 for ; Wed, 03 Dec 2014 03:01:27 -0800 (PST) X-Received: by 10.70.37.79 with SMTP id w15mr7383000pdj.43.1417604487688; Wed, 03 Dec 2014 03:01:27 -0800 (PST) MIME-Version: 1.0 Sender: honglilai@gmail.com Received: by 10.70.80.230 with HTTP; Wed, 3 Dec 2014 03:00:47 -0800 (PST) In-Reply-To: References: From: Hongli Lai Date: Wed, 3 Dec 2014 12:00:47 +0100 X-Google-Sender-Auth: pt01Bk7qI0V1tj-4FmFtVTVtyjA Message-ID: Subject: Re: No, passenger 5.0 is not faster than unicorn :) To: =?UTF-8?Q?Br=C3=A1ulio_Bhavamitra?= Cc: unicorn-public , Hitendra Hugo Melo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: PublicInbox::Filter 0.0.1 List-Id: Unicorn *is* in general very good and very efficient, no doubt about that. Eric Wong has made great design choices and is an excellent programmer. Having said that, in certain specific cases there's still room for improvement. That's why we focused so much on microoptimizations and specific optimizations like turbocaching. Have you followed Phusion Passenger's Server Optimization Guide? https://www.phusionpassenger.com/documentation/ServerOptimizationGuide.html Also, you have to ensure that your Rails app sets the correct caching headers. By default, Rails sets "Cache-Control: private, no-store" so that the turbocache cannot kick in. You should see very different results if you add "headers['Cache-Control'] =3D 'public'" to your Rails app. If you need any help with this, please feel free to contact me off-list. I'd be happy to help. We have also a benchmarking kit so that you can double check the results; email me if you're interested in this. As Sam said, most of the time will be spent in the Rails app. But turbocaching is one notable exception: it's the one feature that can speed things up even if your app is slow - provided that you set HTTP caching headers correctly. Unicorn is excellent at what it does: it's a minimal server with a specific I/O model that is supposed to be used behind a buffering reverse proxy. There is nothing wrong with that, and for the workloads that it's designed for, it's great. Phusion Passenger has merely chosen a non-generalist approach that aims to squeeze additional performance from specific cases. Of course, nothing's a silver bullet. Like any tool, it only works if you use it correctly. On Wed, Dec 3, 2014 at 10:50 AM, Br=C3=A1ulio Bhavamitra wrote: > Hello all, > > I've just tested a one instance each (one worker with unicorn and > --max-pool-size 1 passenger 5) on the rails app I work. > > And the results are just as I expected, no miracle at all: Unicorn is > still the fatest! > (the difference is only a few milliseconds less per request) > > The blocking design of unicorn is proving itself very efficient. > > cheers! > br=C3=A1ulio > > --=20 Phusion | Web Application deployment, scaling, and monitoring solutions Web: http://www.phusion.nl/ E-mail: info@phusion.nl Chamber of commerce no: 08173483 (The Netherlands)