4

I'm running a RoR web application on a dual core AMD Athlon 4450e server w/ 8GB RAM and Ubuntu.

It's doing alright, getting spikes up to 320 dynamic requests per minute, it's also handling all the assets, including serving up some larger video files.

I've got Apache w/ Passenger and MySQL running on the host.

Performance is still pretty consistent but I am seeing the load average starting to creep above 1 during higher load periods and CPU load getting up towards the 40 or 50% mark.

I can afford an additional computer and a quad core system w/ 8GB RAM fits my budget.

Should I turn the current box into the database server and put the quad core in front of it as a web server?

Would I be better off having the quad core run as both a database server and and a web server and keeping the existing dual core running beside it as another web server?

Any other server layouts that I should consider?

Here's a snapshot of the server under load:

server load http://img.skitch.com/20100208-jhk11btcb43yg4mhd75ecinqqr.png

Thanks,

-Tim

3 Answers 3

1

It ain't broke, don't fix it.

As just generic next-steps advice you could/should split out your static files to nginx or a cdn, and then spend some time analyzing your mysql queries to see where indexes or slight tweaks can help.

With a dualcore machine running rails you should pretty easily be able to sustain a load average of 2 - 3 without any user impact.

0

First you need to find out what causes the CPU load - the db, or the apache/RoR application.

I would suggest, that you put the quad-core machine as db server, and leave the dual-core as web server. If you see more troubles with the web server, you can always add another one with load balancing.

But again, first inspect and see what the current load is.

1
  • Hi Sunny, I've updated the post to include a snapshot from New Relic RPM outlining the load split. It seems that the largest and most consistent portion of load is from the web tier and that the database is quite variable. Feb 8, 2010 at 21:23
0

I would set up everything on the new computer since the upgrade is quite significant and use the old one as a test server.

If you outgrow the new one aswell you can set up the RoR app on the old server and use nginx to load balance. Mysql replication might also be an option, at least for the backup value.

1
  • While I have no current need of a test server I could well save myself some money by decommissioning the dual-core if the quad-core is sufficient, by itself. Feb 8, 2010 at 21:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .