I have a mac laptop with a 2.2 GHz Intel Core i7. I believe my laptop has four cores.
I just ran an instance on the EC2 Amazon Cloud Cluster Compute Eight Extra Large Instance (cc2.8xlarge). I believe such an instance is equivalent to renting a computer with an Intel Xeon E5-2670 chip if the AWS web pages are to be believed. This chip is often clocked at 2.6 GHz and has 8 real cores (16 virtual ones).
On the one hand, parfor loops definitely run faster in the cloud. However, there are several pieces of my code which are not parallelized where my laptop runs faster than the instance (0.6 vs. 1.2 seconds, 3.2 vs. 5.5 seconds, 4.9 vs. 7.7 seconds). How can my laptop possibly be so much faster than the cloud?
(I believe I am giving CPU times. The wall times in the cloud appear to be substantially longer by factors of two or three.)
Best Answer