Updating bug heat is expensive

Bug #507474 reported by Graham Binns
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

What happens:
The bug heat updater code in garbo-daily blocks on other DB activity, which means that it can take a spectacularly long time to run (e.g. in 20 hours on staging it had updated 286k out of ~510k bugs).

What should happen:
Bug heat updating should run more efficiently, probably in a batched manner, possibly concurrently given the number of bugs that need updating (and the fact that this number will only keep growing).

Revision history for this message
Gavin Panella (allenap) wrote :

The calculation of bug heat is now driven by a jobs system, not a periodic all-of-the-database recalculation using the DBLoopTuner. This bug was filed in response to the latter.

Changed in malone:
status: Triaged → Invalid
Changed in launchpad:
status: Invalid → Triaged
summary: - Updating bug heat takes too long
+ Updating bug heat is expensive
Revision history for this message
Robert Collins (lifeless) wrote :

I'm reopening this because slow and inefficient is expensive : we have to buy hardware to support such tasks.

We should make bug heat totally deterministic on the bug itself and constant irrespective of date - so that we don't need an expensive process to update it.

Calculations for where the flame boundaries are may need improving too in order to be very cheap - e.g. store the range delimiters in the bug context - which would permit examining just the first 100 bugs in a context to update the range delimiters, and we could do that on-demand when a bug context has bugs within it change, IFF the bug's heat is above the lowest range delimiter. This will also solve a usability problem that the distro developers have reported with the allocation of flames not handling contexts with a few very high visibility bugs.

Revision history for this message
Stuart Bishop (stub) wrote :

Parallel garbo and improved timeouts will help here.

Revision history for this message
Deryck Hodge (deryck) wrote :

Just want to point out that "constant irrespective of date" runs counter to what users said they wanted as we developed bug heat. The reason for this bit is so that the hot bugs list on a bugs homepage for a project or package see very little change without the variation in heat by days of activity. I suspect if the bugs homepage was changed to not have a hot bugs list, somehow to show interesting bugs in a different way, or to treat "hot bugs" as a secondary list on the page, then this aspect of heat would be less useful or required.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 507474] Re: Updating bug heat is expensive

Thanks for noting that Deryck. I think we can do some cheap tests: I
have a theory that we're not giving them that variety now - see for
instance the lp hot bugs page which is essentially static.

Revision history for this message
Robert Collins (lifeless) wrote :

Further to that, we have to find a way to support what users want/need without terrible DB performance: rewriting the bugs table even weekly causes -huge- database bloat and IO issues; so its something we have to change somehow.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.