> The rootserver:
> - 4 GB of RAM
> - 2,67 GHz (Core2Duo)
>
> Architecture:
> 5 XEN-Slices:
> 1. web1 - nginx - Load-Balancing + Static files - 400MB RAM
> 2. app1 - mongrel_cluster with 6 mongrels - 900MB RAM
> 3. app2 - mongrel_cluster with 6 mongrels - 900MB RAM
> 4. db1 - mysql - 1000-(whats left)MB RAM
> 5. BackgroundDrb + (oneday) memcached + postfix (relay to external
> smtpserver) - 500MB RAM
>
> Does this make sense to you? Or will the CPU be to small to handle
> nginx+mysql+10 mongrels?
This really depends on your application. What I've seen happen
multiple times with new apps is that they eat much too much CPU for
the database due to not optimized queries (too many, not using indexes
or simply slow ones).

On the app server side we have seen more memory problems than CPU
issues, but that again depends on what your app is doing. Ours is
mainly displaying stuff so there is not too much work for the app CPU.

Webserver should be fine. If you run into trouble there you can think
about off-loading your static content to an asset host.

I would highly recommend installing a monitoring + graphing tool (we
use nagios + nagios-pnp) to watch your most important parameters like
CPU, RAM, load, response time, etc over time find out where your
bottlenecks are. Additionally enabling MySQL Slow Query Log with a
threshold of e.g. 10s as a start would help you track down your
slowest queries. If you're lucky enough not to see any queries slower
than 10s you may lower the threshold step by step down to 1s (min
resolution of MySQL 5.0)

If your application is already well optimized that one box of your's
should be ok. But you might want to think about having two such boxes
because of redundancy anyways. Then you could balance your VMs accross
both boxes (but make sure you still _could_ run all of them on one box
only).

We're currently serving 50k per day on two root servers having
DualCore 2.3 GHz and 2GB RAM each and the CPU is by far not the
bottleneck here (after doing our homework in database cleanup)

If you need some head start on setting up nagios + nagios-pnp I can
share some of our capistrano recipes for doing that on XEN VMs (same
for all other roles)

Best Regards,

Matthias
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to