[Bug 363695] Re: update-apt-xapian-index uses too much CPU
Max Polk
maxpolk at gmail.com
Sat Jan 5 16:04:16 UTC 2013
A weekly fatal unable to fork error message from /etc/cron.weekly/apt-
xapian-index on a server with 512MB memory with a web server and
database server running leads to this bug. That cron job calls
/usr/sbin/update-apt-xapian-index, which is a Python script that imports
axi and axi.indexer.
Sorting is a classic computer science problem with both time and space
complexity. For time think CPU. For space think memory.
The solution is to change the sorting algorithm in the python axi and
axi.indexer modules. The first priority is to switch to an algorithm
that consumes a whole lot less memory (i.e., each step of the algorithm
keeps less objects in memory), and it will stop crashing and stop
thrashing (memory swapping to disk).
The second priority is of lesser importance (because renice can solve a
lot of the effect), which is to switch to an algorithm that takes a lot
less time to run (i.e., takes fewer steps to complete), and it will stop
consuming so much CPU for so long.
** Summary changed:
- update-apt-xapian-index uses too much CPU
+ update-apt-xapian-index uses too much CPU and memory
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt-xapian-index in Ubuntu.
https://bugs.launchpad.net/bugs/363695
Title:
update-apt-xapian-index uses too much CPU and memory
Status in APT:
Confirmed
Status in “apt-xapian-index” package in Ubuntu:
Fix Released
Bug description:
Binary package hint: apt-xapian-index
A background silent update process shouldn't use 98% CPU. It makes
system sluggish with no visible reason.
To manage notifications about this bug go to:
https://bugs.launchpad.net/apt/+bug/363695/+subscriptions
More information about the foundations-bugs
mailing list