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=unavailable version=3.3.2 X-Original-To: unicorn-public@bogomips.org Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 955F01F5D9 for ; Wed, 3 Dec 2014 14:11:26 +0000 (UTC) Received: by mail-oi0-f54.google.com with SMTP id u20so10795846oif.13 for ; Wed, 03 Dec 2014 06:11:25 -0800 (PST) X-Received: by 10.60.161.47 with SMTP id xp15mr3316524oeb.16.1417615885841; Wed, 03 Dec 2014 06:11:25 -0800 (PST) MIME-Version: 1.0 Sender: brauliobo@gmail.com Received: by 10.202.85.68 with HTTP; Wed, 3 Dec 2014 06:10:45 -0800 (PST) In-Reply-To: References: From: =?UTF-8?Q?Br=C3=A1ulio_Bhavamitra?= Date: Wed, 3 Dec 2014 11:10:45 -0300 X-Google-Sender-Auth: qP24AInUSgaCbrFK-oUNmbzlnI4 Message-ID: Subject: Re: No, passenger 5.0 is not faster than unicorn :) To: Hongli Lai Cc: unicorn-public , Hitendra Hugo Melo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: Hello Hongli, Thank you the guide, I've already learned a bit from it. We already use nginx for static files and ssl and varnish for caching public pages, so maybe turbocaching won't help too much. In this test I've tested passenger in standalone mode (--max-pool-size 1) and unicorn with one worker. On a slow page, the variation was minimal (~8.26 req/s in unicorn and ~8.11 in passenger). I haven't tested fast and cacheable page. Also, I've used ab for benchmarking. Next time will try wrk. cheers, br=C3=A1ulio On Wed, Dec 3, 2014 at 8:00 AM, Hongli Lai wrote: > 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.ht= ml > > Also, you have to ensure that your Rails app sets the correct caching > headers. By default, Rails sets "Cache-Control: private, no-store" so tha= t > the turbocache cannot kick in. You should see very different results if y= ou > add "headers['Cache-Control'] =3D 'public'" to your Rails app. If you nee= d 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 spee= d > 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 specif= ic > 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 designe= d > 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 us= e > 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 >> > > > > -- > 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) --=20 "Lute pela sua ideologia. Seja um com sua ideologia. Viva pela sua ideologia. Morra por sua ideologia" P.R. Sarkar EITA - Educa=C3=A7=C3=A3o, Informa=C3=A7=C3=A3o e Tecnologias para Autogest= =C3=A3o http://cirandas.net/brauliobo http://eita.org.br "Paramapurusha =C3=A9 meu pai e Parama Prakriti =C3=A9 minha m=C3=A3e. O un= iverso =C3=A9 meu lar e todos n=C3=B3s somos cidad=C3=A3os deste cosmo. Este universo =C3= =A9 a imagina=C3=A7=C3=A3o da Mente Macroc=C3=B3smica, e todas as entidades est= =C3=A3o sendo criadas, preservadas e destru=C3=ADdas nas fases de extrovers=C3=A3o e introvers=C3=A3o do fluxo imaginativo c=C3=B3smico. No =C3=A2mbito pessoal,= quando uma pessoa imagina algo em sua mente, naquele momento, essa pessoa =C3=A9 a =C3=BAnica propriet=C3=A1ria daquilo que ela imagina, e ningu=C3=A9m mais. = Quando um ser humano criado mentalmente caminha por um milharal tamb=C3=A9m imaginado, a pessoa imaginada n=C3=A3o =C3=A9 a propriedade desse milharal,= pois ele pertence ao indiv=C3=ADduo que o est=C3=A1 imaginando. Este universo fo= i criado na imagina=C3=A7=C3=A3o de Brahma, a Entidade Suprema, por isso a propriedade deste universo =C3=A9 de Brahma, e n=C3=A3o dos microcosmos que tamb=C3=A9m foram criados pela imagina=C3=A7=C3=A3o de Brahma. Nenhuma prop= riedade deste mundo, mut=C3=A1vel ou imut=C3=A1vel, pertence a um indiv=C3=ADduo em particular; tudo =C3=A9 o patrim=C3=B4nio comum de todos." Restante do texto em http://cirandas.net/brauliobo/blog/a-problematica-de-hoje-em-dia