Cache for C++ analysis does not affect time for server side job

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 9.9.3, CFamily plugin version:
  • how is SonarQube deployed: zip, Docker, Helm
  • what are you trying to achieve
    I am trying to decrease analysis time as much as possible by leveraging the cache.
  • what have you tried so far to achieve this
    I have enabled server side cache but only for a branch to not overload server.
    By doing so I was expecting analysis time to fall dramatically but only the part in the runner seems to be affected going from ~24 to ~13 mins. The job on the server takes roughly the same amount of time, ~25 mins.
    Since there is a cache hit on 2790 of 3163 files I would expect the analysis to finish much sooner.
    Am I missing some flags or is this the expected time to complete the analysis despite the cache?

Hey there.

Yes – in theory (and very specifically, for C/C++/Objective-C files) the server-side processing time should go down as well.

Two things:

  • Compute Engine performance (what is processing the analysis reports) highly depends on database performance. How is CPU/Memory/Disk space doing on your DB server, and by the way, which database engine are you using?
  • The Compute Engine logs for a given task should tell us where most of the time is being taken, and if we should expect the cache to help. Can you run a task where you expect the cache to kick-in (such as one where there is a cache hit on 2790 of 3163 file) and provide those logs from the ce.log file?