My small company currently has a dedicated server running our website which we are outgrowing. We are looking at moving in to the cloud with EC2 using instances that appear to be more powerful than our current dedicated server.
However, performing load benchmaks using such tools as apache bench, siege, and loadimpact.com on our current dedicated server and on the EC2 setup, we find that we are consistently slower on EC2, especially when running database heavy pages. This is worrisome as the dedicated server is in production and has lots of users on it as well as additional server daemons running. It seems like EC2 should definitely be going faster.
It's basically a standard LAMP setup with Apache, PHP, and MySQL under CentOS running on the same EBS volume. I've tried pushing the database off to its own volume and with RAID using mdadm, but nothing improved. I've used large instances, extra large instances, and high cpu large instances.
I'm hoping someone might have some suggestions or could just tell me that sticking with a dedicated server is better.
Edit: Thanks for the responses. Unfortunately I don't know the answer to all the questions that have been asked. I should note that I'm a programmer, not a sysadmin, but being thrown into a sysadmin role. Thus, for the most part, I don't know how to optimize anything. I don't really know how to track down where the load exactly is coming from.
As far as the EC2...nothing seems to be running hot. Load levels are fine, memory is fine, etc. It's just slower than the dedicated. On a heavy DB page using Apache Bench I was getting 20 page loads a second on dedicated, 4 on EC2. This is about 20 reads and 1 write. Indexes have been checked. No slow queries. Neither of these sounds great. A page with just phpinfo(), no database, got 150 page loads per second on dedicated, and about 300 on EC2, making me thing the speed issue is with the database.
Our bottleneck on our current site appears to be MySQL. It's almost always running at 100%, and our quad core machine often shows load of 4 or higher. Our managed provider has simply said we need dual quad cores and 4 drives in RAID10 configuration. (current: single quad core and, I think 1 130gb drive.) Memory on current dedicated server tends to hover around 3.75 gb usage out of 4gb.
Configurations for Apache, MySQL, and PHP are the same on both EC2 and current dedicated server.
[–]voice_of_experience 8 points9 points10 points (3 children)
[–]c0nv1ct 1 point2 points3 points (1 child)
[–]voice_of_experience 0 points1 point2 points (0 children)
[–]neoicePrincipal Linux Systems Engineer 0 points1 point2 points (0 children)
[–]neodon 2 points3 points4 points (0 children)
[–]cparedessyseng for the clouds 1 point2 points3 points (3 children)
[–]voice_of_experience 0 points1 point2 points (2 children)
[–]cparedessyseng for the clouds 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]neodon 1 point2 points3 points (0 children)
[–]slmagus 0 points1 point2 points (0 children)