SonarQube analysis performance difference in MsSQL and postgreSQL

We are working on using SonarQube Enterprise Edition 8.9 LTS,
We tested and found out that our SonarQube instance has a performance analysis issue compared to our Community Edition instance.

These are the details of our SQ EE and CE

SQ EE:

  • version 8.9 LTS
  • database MsSQL Server 15, jdbc driver 9.2

SQ CE:

  • version 9.1
  • database PostgreSQL

Log files:
sq-enterprise.log (8.4 KB)
log sonarqube-community.log (8.1 KB)

Logs Analysis

We did a test by analyze a project to EE and CE instance to see the difference. From the log files, there are quite huge time difference on these steps:

  • Execute component visitors
#SonarQube CE
Execute component visitors | status=SUCCESS | time=4147ms

#SonarQube EE
Execute component visitors | status=SUCCESS | time=253231ms
  • Persist live measures
#SonarQube CE
Persist live measures | insertsOrUpdates=87751 | status=SUCCESS | time=9197ms

#SonarQube EE
Persist live measures | insertsOrUpdates=94039 | status=SUCCESS | time=218020ms
  • Persist sources (sometimes)
#SonarQube CE
Persist sources | status=SUCCESS | time=1669ms

#SonarQube EE
Persist sources | status=SUCCESS | time=164770ms

Questions

  • Does anyone know what is the cause of this?
  • is it because of JDBC Driver issue? or issue in MsSQL Server 15?
  • or perhaps SQ EE has features that cause this?

Any Suggestions or inputs would be greatly appreciated!

Warm regards,
Bagas

Hey there.

There are many different variables at play – the version/edition of SonarQube, how close the database is to the application server, the specs/performance of the database server (how much CPU/memory is available, how up-to-date its indices and statistics are)…

I would recommend you start by isolating the variables (and really focus on database performance, as the Compute Engine is highly impacted by this).

It’s also important to note that any comparisons should be only be made between:

  • First analyses of a project
  • First analyses of a branch
  • Successive analyses of a branch