RPM

Comment 9 for bug 913615

Revision history for this message
In , Yaroslav (yaroslav-redhat-bugs) wrote :

(In reply to comment #6)
My system has this bug.

It's a rawhide system, rpm version 4.9.1.2, yum version 3.4.3.

First I thought I'll just blame yum, which indeed deserves some blame of its own, but after profiling I've found that slowness is somewhere in the RPM itself.

Judging from strace, it seems that the Package database is being read over and over and over again, via pread(), in chunks of 4 KiB. Given that the Packages is 95 MiB in size, that is long time.

Increasing mp_mmapsize to 256 megabytes from 128, and the cache to 128 from 64, hasn't helped it a bit.

strace tells me the files are in fact mmap()'ed, but my puny C knowledge says you usually just use the file as an array of bytes in memory. However, lots of pread() calls issued after this, and lots of pwrite() calls issued when indexes are being written, somehow don't fit my picture of how mmap()ed files should be written or read. Correct me if I'm wrong.

As for timings, they are horrible. 30 minutes for --initdb step.

[root@think slowpoke]# time rpm --initdb --dbpath /root/slowpoke
warning: Generating 12 missing index(es), please wait...

real 30m17.679s
user 0m31.035s
sys 0m14.904s

I'm afraid of doing --rebuilddb; it really seems that either nofsync flag is ignored, or that mmap() is ignored.