Why is rpm -qa | grep openoffice.org2 soooo slow?
Rodd Clarkson
rodd at clarkson.id.au
Tue Feb 15 11:21:21 UTC 2005
On Tue, 2005-02-15 at 10:41 +0000, Luciano Miguel Ferreira Rocha wrote:
>On Tue, Feb 15, 2005 at 07:15:46PM +1100, Rodd Clarkson wrote:
>> [rodd at localhost database]$ time rpm -qa | grep openoffice.org2
>
>And time sh -c 'rpm -qa | grep openoffice.org2'?
>
>And time rpm -qa | fgrep openoffice.org2?
We'll that 15 minutes of my life I'll never get back ;-]
[rodd at localhost ~]$ time sh -c 'rpm -qa | grep openoffice.org2'
openoffice.org2-impress-1.9.77-1
openoffice.org2-core-1.9.77-1
openoffice.org2-xsltfilter-1.9.77-1
openoffice.org2-writer-1.9.77-1
openoffice.org2-graphicfilter-1.9.77-1
real 6m35.301s
user 0m3.121s
sys 0m0.697s
[rodd at localhost ~]$ time rpm -qa | fgrep openoffice.org2
openoffice.org2-impress-1.9.77-1
openoffice.org2-core-1.9.77-1
openoffice.org2-xsltfilter-1.9.77-1
openoffice.org2-writer-1.9.77-1
openoffice.org2-graphicfilter-1.9.77-1
real 6m32.660s
user 0m3.097s
sys 0m0.615s
[rodd at localhost ~]$
Now, this is interesting.
If I just run 'time rpm -qa' then about 15 files appear and then this
file appears
gpg-pubkey-1cddbca9-3f9da14c
after this, the output stops for quite a while (with no real activity on
the CPU) then lots of output and then another stop after
gpg-pubkey-db42a60e-37ea5438
gpg-pubkey-30c9ecf8-3f9da3f7
quite a pause in proceeding, again with no notable CPU usage) and then
lots more files (the sort of output I would expect from rpm -qa) and
then it finishes.
The time info from this is:
real 6m41.756s
user 0m3.245s
sys 0m0.612s
so I think we can assume that the grep doesn't have anything to do with
this.
I suspect something is up with the files listed above.
Rodd
More information about the test
mailing list