Bug 101411 - --rebuilddb and -qa fails to create __db* files
Summary: --rebuilddb and -qa fails to create __db* files
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-31 19:10 UTC by Mitch Pirtle
Modified: 2007-04-18 16:56 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-08-01 16:10:18 UTC
Embargoed:


Attachments (Terms of Use)
results of rpm --rebuilddb -vv (493.02 KB, text/plain)
2003-07-31 19:17 UTC, Mitch Pirtle
no flags Details

Description Mitch Pirtle 2003-07-31 19:10:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030530 Galeon/1.3.5

Description of problem:
As mentioned in the rpm-list list, I cannot create indexes for rpm. 
I've changed LANG=en_US and also tried with LANG=C (and unset LANG), with no effect.

I cannot figure out how to pipe the results to a file for attachment:  

  rpm --rebuilddb -vv > hideously_slow.asc

still spews to the console.  Can you remind me how this is supposed to be done?

Version-Release number of selected component (if applicable):
4.1.1-1.8x

How reproducible:
Always

Steps to Reproduce:
1.  Get a ThinkPad T30, install RH8, and up2date and ximian evolution updates.
2.  rpm (anything, rebuild, install, upgrade etc.)
3.  practice singing "Anticipation..."
    

Actual Results:  rpm --rebuilddb takes 8 minutes on a freshly-installed 1.2GHz
laptop, but takes half that time on my ancient dual-PIII 450.   ?

And when I am done, there are no __db* files in /var/lib/rpm...

Expected Results:  'rpm -qa' or 'rpm --rebuilddb' do not provide the __db* files
either.

Additional info:

As soon as someone can remind me how to pipe the results to a file, I'll attach
to this bugreport.

Comment 1 Mitch Pirtle 2003-07-31 19:17:01 UTC
Created attachment 93301 [details]
results of rpm --rebuilddb -vv

Comment 2 Jeff Johnson 2003-07-31 19:31:10 UTC
Sanity checks:

1) I have ~1000 pkgs, /usr/bin/time rpm --rebuilddb -vv took 1:45.31 minutes
on 600 MHz dual i686, SCSI.

2) --rebuilddb does not recreate __db* files, any other command
run as root should create, but existence of __db* files is not
really a problem.

3) what version of rpm are you using?

Hmmm, so --rebuilddb on laptop is slow.

Can you provide "cat /proc/cpuinfo" from laptop?

Can you also check /usr/bin/time rpm -qa on your two machines?


Comment 3 Mitch Pirtle 2003-07-31 20:17:41 UTC
I did the sanity checks, and here's what I get:

1) I have 761 packages, and I get the following:

28.90user 4.08system 2:51.33elapsed 19%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (500major+13298minor)pagefaults 0swaps

The most annoying part about this is that while it is running, all other
applications (evolution, terminals, konqueror, etc.) grind to a halt (almost
making me think the machine is hung or out of disk).  But you can see that
there's plenty of cpu to go around (Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz).

2) There are no __db* files, even after root doing 'rpm -qa', 'rpm --rebuilddb',
'rpmbuild --rebuild (SRPM)', etc.

3) rpm-4.1.1-1.8x

Results of 'rpm -qa' timing test: laptop was faster than old machine, but -qa is
not what is taking so long.  It is -Uvh, --rebuilddb, -e and -i that are taking
so long.



Comment 4 Jeff Johnson 2003-07-31 21:34:04 UTC
OK, then you're probably slow (but not exceptionally so) because
of disk writes, that's what differentiates -U/-e/-i/--rebuilddb from -qa.

The other processes stopping is (my guess) probably the same cause,
there's nothing magic that rpm is doing, I suspect that any output
intensive program would have similar effect on other processes, possibly
because of swapping.

Try running vmstat 1 in a window to eyeball your disk I/O. Running top
might give you a handle on swapped too.

SO what happens if you do, say,
    tar czvf /tmp/xxx.tar.gz /usr
while monitoring. Do disk writes cause slow response?


Comment 5 Mitch Pirtle 2003-08-01 13:21:30 UTC
Hmm, this machine is swapping like mad.  Could it be the new-and-improved kernel
(2.4.20)?

I'm gonna try booting into the old kernel and see...

Regardless, looks like you're of the hook regarding RPM ;^)

Thanks for the help.


Note You need to log in before you can comment on or make changes to this bug.