One of the most common complaints I see from small businesses that use AWS EC2 instances for their web servers is CPU related so I decided to compare the relative performance of Lightsail vs EC2 instances.

For this test I used sysbench and I’ve pasted the exact outputs I received from each instance type.

Here’s the sysbench command I used for all tests so you can try for yourself:

sysbench --test=cpu --cpu-max-prime=20000 --num-threads=1 run

and to get the CPU model just run:

cat /proc/cpuinfo | grep "model name"

Amazon Lightsail

Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
execution time (avg/stddev): 29.4623/0.00

EC2 – t2.nano

Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
execution time (avg/stddev): 29.7088/0.00

EC2 – t2.2xlarge

Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
execution time (avg/stddev): 27.0648/0.00

EC2 – c4.2xlarge

Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
execution time (avg/stddev): 25.0032/0.00

As you can see there’s basically no difference between the EC2 equivelant of the base Lightsail instance.

Keep in mind I only tested a single CPU, and the larger lightsail and EC2 instances have more so you need to take that into account.

I ran single thread because I was specifically interested in how the individual CPU’s compared but if you want to perform the comparisons yourself using multiple CPU’s then just run the sysbench command above with –num-threads= set to the number of CPU’s your instance has.

Overall my recommendation is to forget Lightsail and stick to EC2, unless you want to capitalize on the free bandwidth that Lightsail gives.

LEAVE A REPLY

Please enter your comment!
Please enter your name here