shared-cpu-1x performance on CPU bound tasks

Hi All,

I am an MSc student currently writing his master’s thesis.
In the process I measured the execution time of Java workloads on different FaaS(-like) platforms from within the code. Though Fly generally compared favorably to other platforms, it completely surpassed my expectations on a simple CPU bound workload. Fly was able to finish a prime number calculation by unoptimized trial division in less than half the time AWS Lambda (or our own server) needed. Since the code and resource allocation were as similar as possible, I didn’t expect such a huge difference.

I tried to investigate the cause, but didn’t find a satisfying explanation, so I would be very thankful if I could get a short statement on this to include in my thesis.

2 Likes

Well that’s super cool!

The results you got are probably a combo of a few things. We run VMs on big, beefy boxes with AMD Epyc CPUs. Most of the hardware has 24 cores /48 threads, some has 32c / 64t. We provision up to 8 or 16 VMs per core, if they were all blasting the CPU you’d get worse performance.

Most VMs aren’t CPU bound, so your VM will most likely get scheduled on a hardware thread that’s close to idle.

1 Like

@kurt just curiosity, but any reason to don’t offer shared-cpu-2x?

It’s been #2 on the priority list for at least two months now. :slight_smile:

We plan to offer up to shared-cpu-8x someday.

3 Likes

@kurt Thank you for your quick reply.

1 Like