RPM

Comment 7 for bug 913615

Revision history for this message
In , Panu (panu-redhat-bugs) wrote :

FWIW the "insane slowness" I referred to occurs when you do 'rpm --rebuilddb' from just the Packages file, triggering index autocreation which in this situation ends up turning fsync on for the new database being built when it shouldn't. The end result is that 'rpmdb --rebuilddb' takes over 20 *minutes* on my systems, when in normal circumstances it completes in a few seconds on the same systems. That's just a dumb (but harmless) bug, will fix.

The 2-5min times for --rebuilddb are quite likely to be something else - when the index/fsync bug is triggered you'll see "warning: Generating <N> missing indexes" message during --rebuilddb. It's a kinda known issue that rpmdb performance starts deteriorating over time (or rather, huge number of upgrades etc), rebuilding the db brings it back to normal and what you're seeing might be just that: the f15 -> f16 upgrade just happened to push it past whatever the limit where performance goes down the drain.

And that apparently different "a few minutes" time range case I'm not able to reproduce. Index generation and db rebuild when done separately run in the expected "a few seconds" timeframe:

[pmatilai@turre ~]$ mkdir /tmp/slowdb
[pmatilai@turre ~]$ xz -cd ~/Download/Packages.xz > /tmp/slowdb/Packages
[pmatilai@turre ~]$ time rpmdb --initdb --dbpath /tmp/slowdb/
warning: Generating 12 missing index(es), please wait...

real 0m5.577s
user 0m3.888s
sys 0m0.453s
[pmatilai@turre ~]$ time rpmdb --rebuilddb --dbpath /tmp/slowdb/

real 0m7.630s
user 0m4.907s
sys 0m0.698s