RPM

Comment 1 for bug 635834

Revision history for this message
In , Zdenek (zdenek-redhat-bugs) wrote :

Description of problem:

RPM seem to be very very slow with database reading:

here are couple examples from my quite long time/fragmented disk usage:

Look at various timed sequences:

# echo 3 >/proc/sys/vm/drop_caches
# time rpm -qa >/dev/null
real 0m47.770s
user 0m1.870s
sys 0m2.803s

# echo 3 >/proc/sys/vm/drop_caches
# time ( cat /var/lib/rpm/Packages >/dev/null ; rpm -qa >/dev/null)
real 0m8.470s

same with already cached data:
# time rpm -qa >/dev/null
real 0m2.840s

After discussion with Jindra (<email address hidden>) I've rebuilded databaze:
rpm --rebuilddb

so now again in same order
# echo 3 >/proc/sys/vm/drop_caches
# time rpm --nosignature --nodigest -qa >/dev/null
real 0m11.517s
user 0m0.480s
sys 0m0.560s

Actually quite an improvement - though I was unware I should rebuild db from time to time to get better performance.

# echo 3 >/proc/sys/vm/drop_caches
# time ( cat /var/lib/rpm/Packages >/dev/null ; rpm --nosignature --nodigest -qa ) >/dev/null
real 0m5.087s
user 0m0.253s
sys 0m0.413s

Hmm still more than 2x faster - some the db reading must have quite some overhead.

# time rpm --nosignature --nodigest -qa >/dev/null
real 0m0.353s
user 0m0.257s
sys 0m0.090s

This looks quite fast and decent when data are already cached and database is freshly rebuild.

I assume someone should track why the disc reading is so slow.
(On nonfragmented drives differences are much bigger)

Version-Release number of selected component (if applicable):
rpm-4.7.1-6.fc12.x86_64

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:

Expected results:

Additional info: