[LRUG] Server capacity

Stuart Eccles stuart at madebymany.co.uk
Fri Mar 16 12:02:38 PDT 2012


Just to back up with Alex here I've been doing some extensive load testing
recently and the best throughput is to have the workers just above the
number of cores. This seems to apply to both passenger and unicorn. Setting
the number of workers at more than double the cores always seems to
decrease max throughput.

On 13 March 2012 14:13, Alex Tomlins <alex.tomlins at unboxedconsulting.com>wrote:

>  On 12/03/2012 16:48, Matthew Rudy Jacobs wrote:
>
>
> On 13 March 2012 00:11, Andrew Stewart <boss at airbladesoftware.com> wrote:
>
>> Hola El Rug,
>>
>> What sort of capacity do people run their servers at?
>>
>> I have a Rails app on a 1-core Ubuntu 10.04 VPS with 1GB RAM.  Everything
>> runs on that box: web server (Nginx), app servers (Unicorn with 5 workers),
>> MySQL, background jobs etc etc.
>>
>>
>  Passenger suggests a 256mb VPS also running MySQL should be able to run
> 2 passenger processes.
> By that logic a 1gb VPS should be able to run 8 passenger processes.
>
>   They also recommend running 30 on a 2Gig VPS (
> http://www.modrails.com/documentation/Users%20guide%20Nginx.html#PassengerMaxPoolSize
> ).
>
> Having said that, I've found that in practice the number of workers you
> can run is more constrained by the number of CPU cores available.  You
> reach a point where adding more workers just increases the CPU contention,
> and the internal response times just end up increasing, so the net gain is
> zero (or even negative).  In the past, I found that the sweet spot for a
> particular (old Rails 2.1) app was around 1.5 workers per CPU core.
> Obviously this will vary with the app, and the hardware, but it's worth
> experimenting with various numbers to find the sweet spot before the Rails
> response times start climbing significantly.
>
> Also, bear in mind that any "free" memory is actually used for disk cache,
> so you want to make sure that there's a reasonable amount available.
>
> Alex
>
> --
>   Alex Tomlins   Unboxed   Consulting      E:
> alex.tomlins at unboxedconsulting.com  M: +44 7824 696 890  T: +44 20 3137
> 2930  F: +44 20 7183 4251     17 Blossom Street  London, E1 6PL  United
> Kingdom  www.unboxedconsulting.com
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>


-- 
Made By Many Ltd
Diespeker Wharf
38 Graham Street
London
N1 8JX

@stueccles / +44 793 955 6523
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120316/205bd1eb/attachment.html>


More information about the Chat mailing list