Comparing a Raspberry PI 4 to AWS
Over the last few months we have been using Raspberry PI's more and more, there are some situations when having a lightweight device onsite makes sense. It does add in an extra layer of complexity, but there are ways to negate the issues created.
This has got me thinking, is it more effective to run a Raspberry PI or a AWS Micro Instance?
First let's compare cost:
Raspberry Pi 4 8GB
Hardware cost: £85.90
32Gb SD Card: £5.99
24 Months Power: £11.28
Total Cost: £103.17
AWS T2 Micro
24 Month VM: £122.88
24 Month 32Gb Storage: £68.64
Total Cost: £191.52
I am surprised, I would have expected AWS to come in cheaper, but what is the performance like between the two?
It's never going to be a like for like comparison, the processors are different, they have differing memory, different Operating Systems, etc. But I needed an excuse to buy a new toy to play with, therefore it's only fair I run some tests.
Raspberry PI 4 8GB
Memory: 5264.52 MiB/s
AWS T2 Micro
Memory: 13152.00 MiB/s
There's some extremely basic testing going on here, the CPU test is the amount of time to generate all prime numbers to 20000, memory is a simple speed test. On CPU they are pretty much the same but for memory AWS wins, I suspect if a complex load was run on both devices the AWS VM would out perform the Raspberry PI.
There is a huge convenience with cloud, I was able to spin up an instance run the tests and delete all within 5 minutes. The Raspberry PI took a couple of days to arrive and an half an hour to get everything running. But in the right situations I can see a valid case for installing more Raspberry PI's at client sites, it makes sense when you need local low load compute resources.