Sonar Scanner slow scanning angularjs or python app on ARM64

Hi, I have similar case, our Angularjs app is scanning more than hour (about 200k lines)

I think it isn’t ok, right? And Python (100k) - 30 mins. This is 4 core vds ubuntu servers, arm64, github runners.

Should I tweak it or this is normal behavior?

1 Like

OMG! On X64 it finished in 3 mins! ARM64 definitely has issue

1 Like

Hi @mmospanenko !

Welcome to Sonar Community :sonar:

Can you tell us what version of SonarQube version you are using?

Latest one, 10.1 I think, Docker on arm64 vds

My CI is x86, ~10minute scan. My dev box is a M2 Macbook Pro, ~2hours.

Here’s a debug (-X log) of a local run in my TS project.

You can see some operations are exceedingly slow, and periodically, the scanner just kinda… hangs without clearly doing much of anything. I’ve annotated a few spots with inline comments (lines starting with ;).

logs.txt (46.6 KB)

Hi @cdaringe

Apologies for the late reply.

Based on the logs you submitted, here’s what I noticed:

  • You are using Java 20, which is not the recommended Java version to be used by the sonar-scanner. Can you please use Java 17? See Prerequisites and overview.
  • I see usage of SonarQube 9.9.1. Can you try using the latest version, which is SonarQube 10.2.1?

If after those changes above, you still have issues, please post your DEBUG sonar logs for me to review.

Hi @mmospanenko , sorry for the late reply, can you try using the latest version of SonarQube and see if you still run into the same problem?

Hi! Yes, we’re trying to use X64 GitHub Action Workers for CI because ARM64 is still unusable (tens times slower). Will be great to have the same performance. I think this is could be related to project.
Let’s try to test Action on X64 and ARM64 instances.

1 Like

@mmospanenko : can you share your github action CI/build yaml and I would like to replicate your issue myself?

If you don’t mind, can you share your CI/build definition or steps you are running with and your project (or similar project that you think is similar to yours)? I would like to replicate this issue as well.

Sorry, I can’t share projects code (NDA), but I can show CI pipeline

Matrix here only for optimization (and we have different Sonar projects for monorepo)

for STR take any python/js/ts project and try to run on X64 and ARM64 runners to compare

1 Like

@mmospanenko : Understood, could you share the CI pipeline? I do not see the file.

I pasted it as a text. Here is without formatting:

Hmm, its still not appearing.

maybe this is because SonarQube I have on AMD64 and runners on ARM64?

No, there is definitely something strange about the runners. As for right now, sonarsource/sonar-scanner-cli, which is probably the Docker image you are using for your scanner, is not compatible with ARM64.

We have internal plans to support ARM64, but not just yet. Please try using X64/AMD64 and see if that helps.

I use native runners (GitHub instructions, not inside containers) on bare metal (ubuntu 22). All CI you can see in code above. Yes, I’m using X64 for bigger projects, hope it will be fixed in the near future, thank you)

1 Like