<div style="font-family: Helvetica; font-size: 13px; ">Hi Andy,<div><br></div><div>There really isn't a one-size-fits-all answer for this kind of thing, it all depends on what you're doing. For example, when you deploy and restart the unicorn process do you spawn 5 new workers and then shut down the old 5? if so you need to be able to cope with this spike in ram without doing too much swapping otherwise your users will see a noticeable performance decrease every time you deploy.</div><div><br></div><div>Keep an eye on your load average and your swap usage if you see any spikes in either then you're probably utilising too much for the one box. I wouldn't usually run one machine at more than 75% 'normal' memory usage.</div><div><br></div><div>Depending on what your application is doing, it is unlikely you will notice a significant improvement with one more Unicorn worker before you start to see other parts of the system degrading (how much cache memory you have assigned to MySQL for example).</div><div><br></div><div>For the PDF-generation, I would spawn another VPS just to do that job. So your application creates a job, and you run the workers on the new VPS. This means that the worker will only work on one at a time and it won't impact on your web application performance.</div><div><br></div></div>
<div><div><br></div><div>-- </div><div>Richard Taylor<br></div><div><br></div></div>
<p style="color: #A0A0A8;">On Monday, 12 March 2012 at 16:11, Andrew Stewart wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>Hola El Rug,</div><div><br></div><div>What sort of capacity do people run their servers at?</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>Thanks in advance. Sorry this isn't a job ad ;)</div><div><br></div><div>Cheers</div><div>Andy Stewart</div><div><br></div><div>-------</div><div><a href="http://airbladesoftware.com">http://airbladesoftware.com</a></div><div><br></div><div><br></div><div>_______________________________________________</div><div>Chat mailing list</div><div><a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a></div><div><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>