manage.py update_rules uses a lot of memory

Bug #1324336 reported by Paul Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-recommender
New
Undecided
Unassigned

Bug Description

Today we were alerted for a performance problem (nagios checks timing out, load average > 300) on one of the rec.ubuntu.com appservers, saci.

This is the host that runs "python manage.py update_rules" every morning at 02:00 UTC (as per RT#56699).

At its peak the process was consuming 6.4GB of memory, which is over 50% of the available physical memory in the system.

Here's the log from this run:

0.03757: Loading carts...
192.63163: Filtering carts...
192.69437: Growing candidate set...
192.69440: Found 0 candidates.
192.69443: Pruned down to 0 large sets.
192.69446: Generated 0 rules
192.83213: Loading carts...
577.71705: Filtering carts...
693.45866: Growing candidate set...
693.60202: Found 11628 candidates.
1128.97660: Pruned down to 4519 large sets.
1129.02459: Generated 3808 rules
1152.77195: Updating Rule table...

For comparison the log from the original QA run in October 2012 was:

0.03763: Loading carts...
12.15095: Filtering carts...
12.15115: Growing candidate set...
12.15118: Found 0 candidates.
12.15120: Pruned down to 0 large sets.
12.15123: Generated 0 rules
12.20738: Loading carts...
21.94895: Filtering carts...
26.98057: Growing candidate set...
27.02475: Found 11325 candidates.
111.22743: Pruned down to 4054 large sets.
111.24513: Generated 3026 rules
111.47725: Updating Rule table...

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 1324336] [NEW] manage.py update_rules uses a lot of memory

Hi,

This is only used for the desktop appstore, so if it is a problem we
could just disable updating the recommendations instead of putting work
in to tuning it.

Thanks,

James

Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote :

I had a quick look and nothing obvious jumps out.

Without spending more time on testing it with production data I don't think we can fix it quickly.

I follow Jame's advice for now.

Revision history for this message
Paul Collins (pjdc) wrote :

I've disabled the cron job on production and on staging (r8208 in Puppet).

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.