Tag Archive - amazon ec2

Amazon EC2 Micro instance, how fast is it?

Today, Amazon announced a new instance type for EC2. I micro instance with 613MB memory and a starting price of $0.02 per hour. But how fast is it?

I’ve previously benchmarked Amazon EC2 and Rackspace, and here comes a new quick-and-dirty performance test using SysBench. The following products where tested.

Product CPU Memory Disk Price
Amazon EC2 Micro 1-2 virtual core 613MB N/A (uses EBS) $0.02 per hour
Rackspace Small 4 virtual cores 256MB 10GB $0.015 per hour

Servers where running Ubuntu 10.04 64bits, tests where performed on two different servers, average scores where used. Here’s the results, less is good.

Product SysBench CPU Sysbench Memory Sysbench File I/O
Amazon EC2 Micro 197.6s * 2635.1s 6.7s
Rackspace Small 7.9s 336.8s 57.3s

* I did manage do boost this down to 35s one run, since bursting is allowed for shorter periods. The following two runs took around 200s.

The following commands where used to do the benching, interesting values was the total time to run the test.

sysbench --num-threads=4 --test=cpu run
sysbench --num-threads=4 --test=memory run
sysbench --num-threads=4 --test=fileio --file-test-mode=rndrw prepare
sysbench --num-threads=4 --test=fileio --file-test-mode=rndrw run

Conclusion

According to SysBench, Rackspace is much faster then Amazon EC2 when it comes to CPU and Memory tests. Amazon EBS is however much faster then the Rackspace storage.

Rackspace Cloud vs. Amazon EC2

Rackspace Cloud, or Amazon EC2, which is best? This is just a quick performance comparison using SysBench. The following products where tested.

Product CPU Memory Disk Price
EC2 Small Instance 1 virtual core 1,7GB 160GB $0.085 per hour
Rackspace 256MB 4 virtual cores 256MB 10GB $0.015 per hour
Rackspace 1024MB 4 virtual cores 1GB 40GB $0.065 per hour

Servers where running Ubuntu 9.10 i386, tests where performed on two different occasions, average scores where used. Here’s the results, less is good.

Product SysBench CPU Sysbench Memory Sysbench File I/O
EC2 Small Instance 29.7s 491.3s 28.6s
Rackspace 256MB 5.6s 219.1s 26.4s
Rackspace 1024MB 4.1s 196.1s 17.8s

The following commands where used to do the benching, interesting values was the total time to run the test.

sysbench --num-threads=4 --test=cpu run
sysbench --num-threads=4 --test=memory run
sysbench --num-threads=4 --test=fileio --file-test-mode=rndrw prepare
sysbench --num-threads=4 --test=fileio --file-test-mode=rndrw run

Conclusion

According to SysBench, Rackspace Cloud is much faster then EC2 in general, and cheaper as well. EC2 however comes with more memory and disk.

Comparison of APC and XCache

APC
Alternative PHP Cache, will be included in the core of PHP 6.

XCache
Developed by one of the developers of Lighttpd.

Benchmarks where done on a small Amazon EC2 instance, running official Ubuntu 9.10 image. Benchmarks where done on two different occasions, average results are used. The following packages are installed from APT.

  • libapache2-mod-php5
  • php5-mysql
  • php-apc
  • php5-xcache
  • mysql-server

The following web sites will be tested

  • Hello World script
  • WordPress 2.9.1
  • Joomla 1.5.15

Benchmarking itself is done with ab (Apache benchmarking tool) on localhost, doing 1000 requests over 10 connections (-n 1000 -c 10). Interesting numbers are request per second.

Here’s the results, numbers are requests per second, the percent is the improvement.

Without accelerator With APC With XCache
Hello World 1499 1602 (7%) 1563 (4%)
WordPress 2,82 12,61 (347%) 12,97 (360%)
Joomla 2,25 3,60 (60%) 3,48 (55%)

The big increase in WordPress performance could be because not much sample data is installed in the default installation (compared to the option in the Joomla install, which i used), which could mean that the large bottleneck in Joomla is MySQL not PHP, while being the other way around for WordPress. But even with large amount of data, the performance improvement should be good.

Conclusion
Since there isn’t any big difference in performance between the two, I would choose APC. Mainly because it will be included in the core of PHP 6.