Top «Prev(2005-12-07) Latest Next(2005-12-19)» Edit

pterjan's diary


2005-12-08

  Found an explanation about rpm -qa speed issue

Few monthes ago I noticed rpm -qa was abnormaly slow but did not find why. Today, checking my referers, I went on Google and found an answer by Paul Nasrat on a Fedora ML.

[pterjan@plop tmp]$ time bash -c 'for i in $(seq 10); do ruby -rrpm -e '\''RPM::DB.new.each{|plop| puts "#{plop.name}-#{plop.version}"}'\'' >/dev/null; done'
2.77user 0.92system 0:04.56elapsed 81%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+83162minor)pagefaults 0swaps
[pterjan@plop tmp]$ time bash -c 'for i in $(seq 10); do rpm -qa --nosignature >/dev/null; done'
6.12user 0.63system 0:07.85elapsed 85%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+56691minor)pagefaults 0swaps
[pterjan@plop tmp]$ time bash -c 'for i in $(seq 10); do rpm -qa >/dev/null; done'
76.25user 0.67system 1:26.77elapsed 88%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+57005minor)pagefaults 0swaps

This option is even documented in the manpage :)

       --nosignature
              Don't verify package or header signatures when reading.

However, the part about defining %_hkp_keyserver does not help as it is already defined (and we also already have _hkp_keyserver_query %nil).

Update : --nosignature is in the man but as a verify or install option, it is not listed in the query section :) I'll have to open a bug for that. I also added the ruby version, it is still twice faster !

Today's TSUKKOMI(Total: 2) [Add a TSUKKOMI]
  rgs (2005-12-08 10:13)

Well, duh, glancing at the code... it looked like redefining %_vsflags_query could solve this, but no, because somehow rpm decided to override it from the popt settings for signatures. So, we could patch rpm to remove this forcing and include the verify-signature flag by default in %__vsflags. So it could be disabled via a usual ~/.rpmmacros.

  RedFox (2005-12-12 10:53)

Whaouu, this is why I found apt-rpm really faster than rpm since many years!!<br><br>with --nosignature, "rpm -qa > /dev/null" take 1.1s instead of 6.5s.<br><br>Thanks for this tip :)


2004|06|07|08|09|11|
2005|01|02|05|06|07|08|09|10|11|12|
2006|01|02|03|06|08|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|12|
2011|02|04|06|
2012|01|05|11|
2013|01|02|04|06|
2014|02|
2015|06|
2017|05|07|12|