I have experience with amazon’s AWS cloudservices for years now, but still have problems with EBS (=amazon network storage) performance. It is not very fast and if you just want to run a simple LAMP server it requires a lot of work and experience to set it up the right way. But how fast is it? How does it compare to the offerings from Linode and the new kid on the block: digitalocean? Both have their advantages: Linode has it’s standard 8 core architecture and RAID. digitalocean has fast SSD disks. But how do they stack up against amazon?
Compare same-priced offerings.
To compare apples with apples instead of oranges, I decided to test the following offerings:
- Amazon Small instance – (with high-utilisation reserved instance) $24 per month.
- Linode 1Gb plan – Costs $20 per month
- Digitalocean $20 plan.
What do they offer for this price?
Amazon: 1.7 GiB of memory, 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit), 160 GB of local instance storage. But the local storage can not be used for permanent storage, as it is ephemeral (destroyed upon server termination). So you need additional EBS storage attached to your instance, which adds to the cost. Also this is with only 1Gb outgoing data transfer, additional data costs $0.12 per Gb. EBS storage is $0.10 per Gb per month, so add $2 per month for 20Gb of EBS.
Linode: 1Gb of memory, 24 GB RAID Storage, 8 cores with lowest priority, 2Tb data transfer included. additional data at $0.10 per Gb
Digitalocean: 2G memory, 2 cores, 40Gb SSD storage, 3Tb transfer included, additional data transfer $0.02 per Gb
Note that amazon can cost a lot more if your data transfer is higher. If you really need 2T outgoing traffic, amazon bills you a hefty $240 additional cost.
For this test I used Amazon Linux (fedora style distro) for EC2 and Centos 6.4 for Linode and DigitalOcean. Apache 2.2.x, php 5.3.x, mysql and AB for the test.
I requested a php page that shows a calender of events, which it fetches from the database, does some layouting and shows the result. It is build upon Laravel 3.
I did multiple AB tests.
- 100 requests and a concurrency of 10. (ab -n 100 -c 10)
- 500 requests with a concurrency of 10 (ab -n 500 -c 10)
- 1000 requests with a concurrency of 20 (ab -n 1000 -c 20)
- 2000 requests from 2 different machines each with a concurrency of 40. (ab -n 2000 -c 40 on both machines at the same time)
The tests were run from an independent server hosted by another company.
These are the results:
|linode||-n 500 -c 10||66,47||150||2743|
|linode||-n 100 -c 10||60,25||165||2529|
|linode||-n 100 -c 10||53,73||186||2254|
|linode||-n 500 -c 10||67,25||148||2778|
|linode||-n 100 -c 10||64,12||156||2655|
|linode||-n 1000 -c 20||78,52||254||3243||3,22|
|linode||-n 2000 -c 40||42,23||947||1743||14,95|
|amazon||-n 100 -c 10||4,51||2216||190|
|amazon||-n 100 -c 10||4,39||2280||185|
|amazon||-n 500 -c 10||4,59||2177||193||8,15|
|amazon||-n 1000 -c 20||4,51||2435||190||17,06|
|amazon||-n 2000 -c 40||2,24||17830||94||18,5|
|digitalocean||-n 100 -c 10||26,4||378||1107|
|digitalocean||-n 500 -c 10||34,09||293||1407|
|digitalocean||-n 100 -c 10||28,24||354||1165|
|digitalocean||-n 500 -c 10||33,94||294||1401||6,53|
|digitalocean||-n 100 -c 10||29,26||341||1207|
|digitalocean||-n 1000 -c 20||32,7||611||1345||12,45|
|digitalocean||-n 2000 -c 40||18,2||2112||712||14,35|
During the tests I run top on each server and wrote down the highest server loads for the bigger tests.
Well, amazon just sucks. At only 4.5 request per second it is about 15 times SLOWER than the linode box. Is this due to the slow EBS volumes or is this due to their 1 ECU compute unit? Looking at the high load figures, the problem seems CPU-bound in amazons case.
Digital ocean is about half the speed of Linode, in spite of their fast SSD disks. But they are stilll 6 times faster than amazon.
But the winner without any doubt is Linode. Their 8 core server really rocks in this case.
I have to rethink my amazon strategy. Is amazon overpriced? do I need expensive high-CPU instances to compete with the linode performance? It seems linode has the best cards in this space currently, and the differences are too big to ignore.