[LRUG] Server capacity

Riccardo Tacconi rtacconi at gmail.com
Mon Mar 12 09:42:58 PDT 2012


I have not used unicorn but can a Rails app using MRI can use more than one
core. MRI has the global interpreter lock, so unless you use JRuby or
Rubinius, having more than one unicorns should not help or increase the
hover head. I think it is better to have to VPSs instead of one of VPS with
two cores. As the others said you could more MySql and/or the worker in
another VPS. When the CPU is constantly over 70% it means the server is not
enough and it will not be capable to handle spikes of workload. I usually
move MySql to another VPS. On EC2 I prefer XeroundDB to run Mysql in the
cloud

On 12 March 2012 17:33, George Sheppard <george at fuzzmonkey.co.uk> wrote:

> Hey Andy,
>
> Have you done any performance testing with different numbers of unicorn
> workers? I was under the impression that with Unicorn the number of workers
> should be roughly equal to number of cores available. When i've
> experimented in the past i got better performance out of fewer workers on a
> low core box.
>
> > Another thing: from time to time the app renders big PDFs with Prawn,
> and when this happens the CPU is maxed out for potentially several minutes,
> adversely affecting responsiveness.  What's a good way to address this?
>
> Upgrade your VPS to have more cores ;)
>
> Regards,
>
> George
>
> On 12 Mar 2012, at 16:11, Andrew Stewart 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.
> >
> > The RAM usage hovers at around 75%.  I want to make the most of what
> I've got; is 75% too conservative?  Adding another Unicorn worker would
> take the RAM usage to about 85%.  I wonder how much memory it's sensible to
> use up.
> >
> > Another thing: from time to time the app renders big PDFs with Prawn,
> and when this happens the CPU is maxed out for potentially several minutes,
> adversely affecting responsiveness.  What's a good way to address this?
> >
> > Thanks in advance.  Sorry this isn't a job ad ;)
> >
> > Cheers
> > Andy Stewart
> >
> > -------
> > http://airbladesoftware.com
> >
> >
> > _______________________________________________
> > Chat mailing list
> > Chat at lists.lrug.org
> > http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>



-- 
Riccardo Tacconi
Ruby on Rails and PHP development - System Administration
VIRTUELOGIC LIMITED

http://github.com/rtacconi
http://riccardotacconi.blogspot.com
http://twitter.com/rtacconi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120312/7257b911/attachment-0003.html>


More information about the Chat mailing list