If you've tried Magento, you know that it can be dang slow. Especially versions prior to 1.4. I don't know what the heck they're doing with all those CPU cycles, but Magento sure eats them up.
Enter the Rackspace Cloud.
In an attempt to improve the performance of my dual quad-core AMD64 HP web server (yes, 8 CPUs) and the 15k SCSI drives in my database server, I started testing out a couple of my Magento sites on the Rackspace Cloud solution. The results have been somewhat remarkable - but not without a bit of work.
My experience has shown that in order to run a Magento site and the MySql database behind it on the same Rackspace CloudServers instance, you really need a 1GB instance or larger. I have tried the smaller instance sizes, but they quickly run out of memory and go to swap, which makes the situation even worse than my shared servers.
With a 1GB instance, there is ample disk space for my site and database with over 5,000 SKUs. The I/O throughput appears to be at least as good as my 15k SCSI hardware RAID1 configuration on an HP DL360. In fact, I am pretty confident it is actually better. And while Rackspace is very "cloudy" about the amount of CPU that a particular instance is allocated, nothing appears to become CPU bound on my installations.
Here are a couple of recommended optimizations if you are planning to run Magento and MySql on CloudServers from Rackspace:
- Turn on Query Caching for MySQL. I generally set the max size of the QCache to about 1/3 of the total system memory. Going larger than that will eventually result in using swap and slow everything down to a crawl.
- Install APC for PHP. This makes a huge difference for Magento. Again, I set the memory limit for the APC cache to around 30% of system memory. I have found that different sites will use dramatically different amounts of the APC cache, so monitor your own usage and adjust the maximum allocation accordingly.
One of my favorite features of Rackspace CloudServers is the ability to resize an instance in place. If you find that you need more CPU or RAM because of a spike in demand, simply up-size your instance and perhaps adjust your cache sizes (described above). So much better than trying to get another machine, install the OS & software, copy over the data, etc, etc. When I have tested instance resizing, there is typically less than 5 minutes of downtime while the server is resized. Well worth it when the server comes back online and can service the the load properly.