SonarQube standard configuration for better performance

we are using Community Edition Version 7.5 for this version we are using below configuration,

75 lac LOC per project,

12 projects with 50 lac+ LOC lines.

Virtual windows server 2012

RAM : 32 GB

Core: 4

500GB harddisk

sonar.web.javaOpts=-Xmx6144m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -server

sonar.ce.javaOpts=-Xmx6144m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Xmx512m -XX:+HeapDumpOnOutOfMemoryError


Each analysis takes average 8-9 hours on background scan.

so for Community Edition How mach Heap Size is required and what is standard configuration for it ?


SonarQube is built to scale vertically, so putting a bigger/better/faster machine under it should help. Since analyses are taking a long time server-side(?) then you probably want to bump up the sonar.ce.javaOpts values. I can’t tell you by how much. If it were me, I’d just gradually add until it stopped seeming to make a difference.

Another (non-exclusive) option is to break your megaprojects up and analyze subsets of them as separate projects. If I’ve understood correctly, you’ve got 12 projects, each with approximately … 5 million lines each? That’s really big. I’m not surprised analysis report processing takes a long time.

Also, it’s incumbent upon me to mention two things:

  • 8.0 is the current version and 7.9.1 is the current LTS. You should upgrade at your earliest convenience. These later versions include some improvements to the notifications algorithm, which had been observed to have a performance impact.

  • With projects of that size, you would benefit from the horizontal scaling offered by Data Center Edition($$$). It would allow you to provision multiple machines to process analysis reports so that your 5m line projects could be processed simultaneously rather than serially. Note that Enterprise Edition($$) does include the ability to parallel process reports on a single server, but that can be tricky to tune correctly, and I doubt it would go well with projects as large as yours. I recognize that you’re not likely to want to go from free to the most expensive edition we offer (and this is the first time I’ve ever mentioned DCE in the community) but I wanted to give you all your options.