Nginx Requests/Second - Raspberry Pi vs. Amazon EC2

Previously, I decided to benchmark my Raspberry Pi. Since I host this website on Amazon EC2, I started to wonder – could my Raspberry Pi theoretically host this website (ignoring the AWS tools, etc.)?

(Note: I have gotten some great questions and comments to this post and have investigated some of them with a followup.)

The setup

I used the Phoronix Test Suite along with the pts/nginx test to benchmark my Raspberry Pi and AWS instance. The pts/nginx test builds Nginx 1.1 and then launches 500,000 requests in batches of 100 to determine the average number of requests the server can process per second.

Raspberry Pi

My Pi is a “b” model with 256 MB of RAM running the latest build of Raspbian. I am using a 16GB “class 10” SD card and it’s connected to my CascadeLink account.

Hardware: Processor: ARMv6-compatible rev 7 @ 1.00GHz (1 Core), Motherboard: BCM2708, Memory: 184MB, Disk: 16GB SD Software: OS: Debian Linux 7.0, Kernel: 3.6.11+ (armv6l), Compiler: GCC 4.6, File-System: ext4, Screen Resolution: 720x480

AWS instance

My AWS instance is a 32-bit “micro” instance running the Amazon Linux AMI. The instance is in the Virginia data center.

Hardware: Processor: Intel Xeon E5430 @ 2.67GHz (1 Core), Memory: 603MB, Disk: 10GB Software: OS: Amazon Linux AMI 2010.11.2 (beta), Kernel: 2.6.34.7-56.40.amzn1.i686 (i686), Compiler: GCC 4.1.2 20080704, File-System: ext3, System Layer: Xen 3.1.2-128.1.10.el5 Hypervisor

The results

I expected the AWS instance to win handily. Interestingly, the Pi won. By a lot.

Pi average – 498.02 requests/sec
EC2 average – 329.83 requests/sec

Pi results

NGINX Benchmark 1.0.11: pts/nginx-1.1.0 Test 1 of 1 Estimated Trial Run Count: 3 Estimated Time To Completion: 51 Minutes Running Pre-Test Script @ 19:40:39 Started Run 1 @ 19:40:44 Started Run 2 @ 19:57:30 Started Run 3 @ 20:14:40 [Std. Dev: 1.30%] Running Post-Test Script @ 20:31:28 Test Results: 502.55 490.62 500.89 Average: 498.02 Requests Per Second

AWS results

NGINX Benchmark 1.0.11: pts/nginx-1.1.0 Test 1 of 1 Estimated Trial Run Count: 3 Estimated Time To Completion: 1 Hour, 18 Minutes Running Pre-Test Script @ 13:10:05 Started Run 1 @ 13:10:13 Started Run 2 @ 13:33:31 Started Run 3 @ 14:02:11 [Std. Dev: 12.06%] Running Post-Test Script @ 14:29:10 Test Results: 375.66 304.53 309.3