Memory usage of the karma update script foaf-update-karma-cache.py seems excessive

Bug #327423 reported by Steve McInerney
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

Have noticed recently that the foaf-update-karma-cache.py script gobbles quite a lot of memory. This has caused some resourcing worries with memory usage between this script and others that run at the same time.
ie down to <400Mb swap left. Don't appear to be thrashing, but getting close to OOMkiller time.

Have started tracking usage as a graph: KarmaUpdateRSS

Unsure if bug or expected behaviour?

Revision history for this message
Tom Haddon (mthaddon) wrote :

Link to the graph for the click happy - https://lpstats.canonical.com/graphs/KarmaUpdateRSS/

Revision history for this message
Guilherme Salgado (salgado) wrote :

That's kind of expected as the script sucks all rows from the Karma table into memory to later iterate on them.

Changed in launchpad-registry:
status: New → Triaged
Revision history for this message
Tom Haddon (mthaddon) wrote :

Are you saying that there isn't a more efficient way of doing this? I don't think this kind of memory usage should be considered "okay" as we don't have unlimited hardware resources.

Revision history for this message
Guilherme Salgado (salgado) wrote : Re: [Bug 327423] Re: Memory usage of the karma update script foaf-update-karma-cache.py seems excessive

I'm just stating why the script uses so much memory (not surprisingly)
so that whoever is assigned to fix it knows where to start.

Revision history for this message
Curtis Hovey (sinzui) wrote :

As Salgado stated, this is expected. I believe the scaling issue is growing into a bug. We do not intend to address this at this time, but we need to consider new ways to accomplishing this task. At the January 2009 teamleads sprint, we decided to review how karma work after Launchpad 3.0 is released. Is there are clear performance point to indicate that this bug is high? I would prefer to address this before this becomes critical.

Changed in launchpad-registry:
importance: Undecided → Low
Revision history for this message
Tom Haddon (mthaddon) wrote :

The basic problem is that we have quick a few memory hungry scripts that have to be run at the same time (this, language pack exporter, poimport, etc.) and that means we often get into the situation where we have to kill some jobs to avoid OOM killer kicking in. Assigning priority to reducing memory usage on any of these single scripts is difficult because on their own they're not causing critical problems, but together they are. And it's a problem that only gets worse as Launchpad usage increases - we had hoped to solve this by moving the scripts to a newer and faster server (forster -> loganberry), but we're already finding this isn't enough to fix the issue.

Revision history for this message
Curtis Hovey (sinzui) wrote :

This issue now appear to be high enough to postpone new feature work.

Changed in launchpad-registry:
importance: Low → High
milestone: none → 2.2.3
Revision history for this message
Curtis Hovey (sinzui) wrote :

I think we will investigate batching in this script.

Changed in launchpad-registry:
milestone: 2.2.3 → 2.2.4
Revision history for this message
Curtis Hovey (sinzui) wrote :

2.5 goals will block work on this. It may be addresses in late 2.5, but I cannot commit to it. 2.6 is a realistic goal.

Changed in launchpad-registry:
milestone: 2.2.4 → 2.2.6
Curtis Hovey (sinzui)
Changed in launchpad-registry:
importance: High → Low
milestone: 2.2.6 → none
tags: added: cleanup
removed: registry-people
Tom Haddon (mthaddon)
tags: added: canonical-losa-lp
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.