Amazon AWS has been recommending ARM Graviton2 as a cost-effective alternative to Intel/AMD instances. So I tried it out.
I have been running a lot of embarrassingly parallel R jobs on AWS, using mclapply on Ubuntu 18.04. All on the same type of x86 based instances I’ve been using for years. Then I read about ARM Graviton2 and gave it a try. For good measure, I included my Mac laptop.
Below I show the timings for a typical job, on 16 vCPU instances and on demand prices.
|Machine||Hourly cost||Processor maker||Processor type||R version||Cores and time|
|mac pro||Intel||2.4 GHz 8-Core Intel Core i9||3.6.3||04:23||04:45||07:06||12:41||18:12|
|mac pro||Intel||2.4 GHz 8-Core Intel Core i10||4.0.1||04:23||04:45||07:06||12:41||18:12|
I didn’t quite get the 40% cost-per-performance Amazon promises, but the ARM is 20% cheaper than x86 (14% if I use R 3.6).
But that only holds if one uses all 16 cores. Since x86 has hyperthreading, by doing a 16 core run on the x86 16 vCPU machine we don’t have 16 real cores, but 8. And the x86 is faster per real core.
So ARM is better if one keeps all cores fully engaged at all times, else x86 has the cost advantage.
I did not expect the old R 3.6.3 to be faster than the latest 4.0.1 on Ubuntu (but not the mac) but here we are.
© All rights reserved, Jon Danielsson, 2021