SonarQube report process is very slow

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:

Execute component visitors | status=SUCCESS | time=101249ms
Persist live measures | insertsOrUpdates=44972 | status=SUCCESS | time=114758ms

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!

what is the size of your DB?

2 core, 8GB mem, and 50 GB disk
current DB size is 686 MB

Hi,

Welcome to the community!

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?

 
Ann

Hi Ann, Thank you for your reply!
In both env, I only analyzed one same project.

Hi,

Thanks for that important detail!

Can you just double check your server logs and make sure there’s nothing of note in them, please?

 
Thx,
Ann