[LRUG] Server capacity
Alex Tomlins
alex.tomlins at unboxedconsulting.com
Tue Mar 13 07:13:37 PDT 2012
On 12/03/2012 16:48, Matthew Rudy Jacobs wrote:
>
> On 13 March 2012 00:11, Andrew Stewart <boss at airbladesoftware.com
> <mailto: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
<mailto: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 <http://www.unboxedconsulting.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120313/127da21f/attachment-0003.html>
More information about the Chat
mailing list