[ZBX-1362] Performance on Administration->Notifications (Notification Report) is bad Created: 2009 Nov 25  Updated: 2017 May 30  Resolved: 2011 Mar 22

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.9.0 (alpha)
Fix Version/s: 1.8.5

Type: Incident report Priority: Major
Reporter: Alexei Vladishev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

1.7.2


Attachments: PNG File single-media-type.png    

 Description   

It executes tons of SQL queries, must be optimized!



 Comments   
Comment by Konstantin Buravcov (Inactive) [ 2010 Sep 14 ]

DEV branch: ZBX-1362

Raw SQL queries changed to ZABBIX API method. Now it requires about 300 queries to get a report by day (was ~2000) and 50 to get report by week.

Comment by richlv [ 2010 Sep 14 ]

this seems to have increased memory usage notably, though. trunk renders that page with 64mb memory limit just fine, dev branch runs out of memory...

Comment by richlv [ 2010 Oct 26 ]

ping. what about the memory usage increase ? should it be that big ?

Comment by Artem Suharev (Inactive) [ 2010 Oct 26 ]

Memory usage is lowered. Fix tested

Comment by Artem Suharev (Inactive) [ 2010 Oct 26 ]

May merge.

Comment by richlv [ 2010 Oct 26 ]

today's updates brought memory usage down from some 68 megs to 35 - while still quite high, it's half of what it was, so good to merge

Comment by Konstantin Buravcov (Inactive) [ 2010 Oct 28 ]

merged: branches/1.8 rev 15144

Comment by Alexei Vladishev [ 2011 Feb 23 ]

The fix was absolutely incorrect. Now we have hardcoded media types, it wasn't so before.

Comment by Konstantin Buravcov (Inactive) [ 2011 Feb 24 ]

I didn't really find hardcoded media types there. This line looks like one:

$summary[$userid]['medias'] = array('1'=>0, '2'=>0, '3'=>0, '4'=>0);

but numbers 1, 2, 3 and 4 do not refer to media types, they refer to position of a number in string '17 (17/0/0/0)' in report4.php

The media type them selves are referred here:

$summary[$ai['userid']]['medias'][$ai['mediatypeid']]++;

Comment by richlv [ 2011 Feb 24 ]

hmm. in 1.8 branch, i have 3 media types defined. footer says :

all (Email/Jabber/SMS)

cell contents say :

0 (0/0/0/0)

if i add two more media types to have 5 of them, table cell contents don't change

Comment by Konstantin Buravcov (Inactive) [ 2011 Feb 24 ]

Thank you, richlv, now I get it.

fix commited to 1.8 branch rev 18057 and trunk rev 18058

Comment by Aleksandrs Saveljevs [ 2011 Feb 24 ]

If no media types are defined, empty parentheses will be shown, like this: "0 ()". Is this intended?

Comment by richlv [ 2011 Feb 24 ]

maybe then the table should not be constructed at all and just a message "No media types defined" displayed ?

Comment by Konstantin Buravcov (Inactive) [ 2011 Feb 24 ]

In this case you might want to create another issue for that, since this one is already merged.

Comment by Aleksandrs Saveljevs [ 2011 Feb 24 ]

The "0 ()" issue moved to ZBX-3566.

Comment by richlv [ 2011 Feb 24 ]

this one works ok - after code review could be closed

Comment by Aleksandrs Saveljevs [ 2011 Mar 04 ]

Hm, why do I see single-media-type.png when viewing a weekly report for a single media type?

Comment by Konstantin Buravcov (Inactive) [ 2011 Mar 22 ]

Aleksandrs Saveljevs, I will fix this in ZBX-3566.

Generated at Thu Apr 25 11:28:37 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.