Ever since Amazon Web Services announced their new service Lightsail, I’ve been wondering how does its performance compare to virtually same droplets hosted by DigitalOcean. I’m not going to go into too many details regarding the similarities and differences between the two platforms, but if you’d like to learn more, here’s a good read by Wogan May and another one by Phil Dougherty.
For the AWS Lightsail vs. DigitalOcean performance comparison, I decided to use sysbench as described in the howtoforge.com article.
Both servers were provisioned by Laravel Forge, running the same software versions. The hardware specs are 4 GB RAM, 2 vCPUs, 60 GB SSD.
Running the ‘sysbench –test=cpu –cpu-max-prime=20000 run’ command the test yielded these results:
execution time (avg/stddev): 33.3628/0.00
execution time (avg/stddev): 29.7144/0.00
Lightsail came in first almost 11% faster.
File IO Benchmark
Although the howtoforge.com article suggests running a test with a 150GB test file, I went with a much smaller value of 25GB due to the lack of disk space. The idea here is that we need to create a test file that is much bigger than the RAM, otherwise the system will use RAM for caching which tampers with the benchmark results.
These are the results of the 300 seconds test:
Read 6.0416Gb Written 4.0277Gb Total transferred 10.069Gb (34.37Mb/sec)
Read 4.6649Gb Written 3.11Gb Total transferred 7.7749Gb (26.538Mb/sec)
Digital Ocean won by 22.78% faster execution.
I ran the test against 1,000,000 rows of data. The results:
transactions: 25906 (431.70 per sec.)
transactions: 62947 (1049.02 per sec.)
AWS Lightsail was better by a whopping 58.85%
I’m a fan of both platforms, and I’ve been using both for a long time, but always gave an advantage to DigitalOcean whenever I needed a small VPS. I must admit that I’m positively surprised by AWS Lightsail performance. Apart from being inferior in the IO area, AWS Lightsail VPS had a better CPU and MYSQL performance. I guess I’ll give some thought to an idea of consolidating all of our resources under the AWS’ roof.