Why are the ARM instances so slow?

Why are ARM instances so much slower compared to x86 instances? It takes a long time to spin up environments, and building npm packages also takes longer. Why is this happening?

Are these the Docker ARM resource classes or the Machine ARM resource classes? Could you send some stats on the slowness that you’re seeing and specifically which resource class size you’re using

I am referring to official ARM instances, such as arm.medium. The ‘Spin up environment’ step takes 14 seconds on these instances, whereas the equivalent x86 instance takes only 3 seconds.

Additionally, the build job takes significantly longer compared to x86 instances.

Overall, the performance is noticeably slower. Could you please assist in optimizing the performance to match that of x86 instances?"

Thanks

Sorry I should have been more precise. arm.medium can be used with “ARM Linux VM” executors or with the Docker executor.

The spin-up time can differ between the two depending on the docker image that is used or the machine image that is used.

The build job being slower is not completely unexpected as many build tools have been optimized for x86 and ARM in general can be a bit slower for tasks that are compute-intensive. Are you doing any sort of x86 emulation? That would also slow things down.

What is the motivation for using the ARM resources? Are you doing something that requires the native ARM hardware?

I am building NodeJS applications hosted on an ARM runtime, so building in the same runtime makes more sense.

I referred to the arm.medium container when comparing it to the x86 container, both using the official CircleCI Node.js image (cimg/node), and the performance difference is significant. For linting JS code, the x86 instance is 30% faster than the ARM instance, and the build process shows similar results.

I’m curious about why this is happening. My older ARM M1 Mac is significantly faster than the medium (x86 container) at performing the same tasks. I expected the ARM instance to run faster than x86, but it’s a completely different story. Does this mean that CircleCI is using a less powerful ARM instance compared to x86?

Got it, makes sense to use the ARM resource, thanks for clarifying.

I have occasionally seen intermittent slowness with the ARM resources compared to x86, but not consistent slowness. To confirm, you’re seeing this slowness while the job is running, not the start-up time right? And also you’re seeing this regularly, not intermittnetly?

The ARM instance and the x86 instances are of similar specs, so it shouldn’t be less powerful.

  1. The “spin up environment” step takes longer on an ARM instance compared to an x86 instance.
  2. The time to run NodeJS scripts, such as bundling, linting, and testing, is significantly slower on ARM than on x86.

I don’t expect it to be faster, but it should at least be comparable. However, it runs much slower. For example, a job that takes 6 minutes on an ARM instance takes only 4.5 minutes on an x86 instance, both using the same NodeJS image.