I am currently using SonarQube developer version 9.7.0.61563 with PostgreSql 13.0.
when testing with H2 embedded database, report process only takes about 10s. After migrating to production env which PostgreSQL, it takes 5-10 mins to process the report. Most of time were spent on those stages:
Seems very similar to the question here, but after I increasing work_mem of PostgreSQL and the memory of SonarQube server, performance is not improved.
Please tell me what could be the reason?
Thanks in advance!
I guess when you were testing with the H2 DB, you only analyzed one or two projects? Did you analyze the same project that you’re now seeing a 10min processing time on? Or just a small, test project?
We have recently upgraded from 7.9.3 → 8.9.7 → 9.6 and are also seeing Background tasks taking hours to complete for a very large, complex project. Specifically, we see a huge duration in Execute Component Visitors:
2023.01.22 14:57:58 INFO ce[AYXbDstweTkuOtrY3CPn][o.s.c.t.s.ComputationStepExecutor] Compute complexity measures | status=SUCCESS | time=64ms
2023.01.22 14:57:58 INFO ce[AYXbDstweTkuOtrY3CPn][o.s.c.t.s.ComputationStepExecutor] Load measure computers | status=SUCCESS | time=0ms
2023.01.22 14:57:58 INFO ce[AYXbDstweTkuOtrY3CPn][o.s.c.t.s.ComputationStepExecutor] Compute Quality Profile status | status=SUCCESS | time=3ms
2023.01.22 21:05:59 INFO ce[AYXbDstweTkuOtrY3CPn][o.s.c.t.s.ComputationStepExecutor] Execute component visitors | status=SUCCESS | time=22080307ms
2023.01.22 21:05:59 INFO ce[AYXbDstweTkuOtrY3CPn][o.s.c.t.s.ComputationStepExecutor] Checks executed after computation of measures | status=SUCCESS | time=12ms
2023.01.22 21:05:59 INFO ce[AYXbDstweTkuOtrY3CPn][o.s.c.t.s.ComputationStepExecutor] Compute Quality Gate measures | status=SUCCESS | time=1ms
What did you bump your postgres work_mem value (and others?) to address this please? I believe ours is set to the default at the moment, which is only 4MB. Shared_buffers is at 4096mb but not sure if that matters.