Very slow performance UI dashboard

59 views
Skip to first unread message

Richard Zaat

unread,
May 22, 2017, 4:41:36 PM5/22/17
to SonarQube
Hi,

We minimized our dashboard, and weird enough, sometimes it shows up in seconds, sometimes it takes > 15 minutes for the dashboard to show up.
At the moment we have SonarQube 5.6.1 installed on Azure, with an Azure Database, following the ALM rangers template.
According to the Azure DB analyzer, the most consuming query at the moment is (see below).
Executing only this query in SQL Management Studio takes > 4 minutes, and is still running.

SELECT s.id, s.project_id, s.root_project_id, pmsort.value 
FROM snapshots s 
INNER JOIN projects p ON s.project_id=p.id  
INNER JOIN properties props ON props.resource_id=s.project_id  
LEFT OUTER JOIN project_measures pmsort ON s.id=pmsort.snapshot_id 
AND pmsort.metric_id=124 
AND pmsort.rule_id IS NULL 
AND pmsort.rule_priority IS NULL 
AND pmsort.characteristic_id IS NULL 
AND pmsort.person_id IS NULL  
WHERE  s.status='P' 
AND s.islast=1 
AND p.copy_resource_id IS NULL  
AND props.prop_key='favourite' 
AND props.resource_id IS NOT NULL 
AND props.user_id=1

We have 8 projects and not even a 2Gb database size consumed. Any ideas on how we can get a more stable performance? 

G. Ann Campbell

unread,
May 23, 2017, 8:27:14 AM5/23/17
to SonarQube
Hi,

5.6.6 is the current version of the LTS. I don't see tickets in the release notes relevant to performance on your Db, but a jump to 5.6.6 would include a security fix, so you should consider it. Once you're there, it will be easier to help you.

Also, could you please elaborate on "we minimized our dashboard"? Do you mean that you stripped it down to the bare essentials in terms of widgets and data?


Thx,
Ann

Richard Zaat

unread,
May 23, 2017, 9:24:36 AM5/23/17
to G. Ann Campbell, SonarQube

Hi,

 

Thanks for the quick reply. We will indeed upgrade to 5.6.6. Right now we have a high speed performance again.

I made a change by adding an index to project_measures for the columns

      [characteristic_id] ASC,

       [metric_id] ASC,

       [person_id] ASC,

       [rule_id] ASC,

       [rule_priority]

 

And an index based on snapshots and the columns

       [islast] ASC,

       [root_project_id] ASC,

       [status] ASC

 

Yesterday the query mentioned earlier took many minutes, now it runs within less than a second.

Hopefully this works, otherwise I will check to see if it is the Azure database server that is not fast enough. Our database contains 1.2Gb, so that cannot be the case.

 

And indeed, with minimize the dashboards I meant removing all additional widgets (heatmap for instance).

 

My advice would be to at least add a few more indexes to the sonarqube database to increase its performance.

 

I will let you know if we have major performance issues over time or that they have been fixed for now.

 

Thanks again

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/7nQ7sBUKhzw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/0d381474-82b9-4e17-8217-c0172694dc08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Zaat

unread,
May 29, 2017, 6:01:41 AM5/29/17
to SonarQube
Hi Ann,

We've been running the same sonarqube environment (5.6.1) for a while now, with the indexes as mentioned below and it is running like a charm.
In fact, our dashboards have never been so fast. Maybe something for the dev team of sonarqube to look into (adding those indexes).

Regards and thanks for your quick reply so far!

Regards,
Richard


Op dinsdag 23 mei 2017 14:27:14 UTC+2 schreef G. Ann Campbell:

G. Ann Campbell

unread,
May 30, 2017, 8:00:51 AM5/30/17
to Richard Zaat, SonarQube
Hi Richard,

Thanks for the followup. We're going to take a look.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/7nQ7sBUKhzw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/d32619b4-3c7d-4a1c-98a1-6060421c8e28%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages