Hello, Am Montag, 15. September 2014 schrieb 1xx:
How many seconds does "time rpm -qa | wc" cost it in your OS?
First attemp: cb@geeko:~> time rpm -qa | wc -l 3071 real 1m37.325s user 0m1.997s sys 0m0.767s Second attemp, now with everything in the cache: cb@geeko:~> time rpm -qa | wc -l 3071 real 0m1.747s user 0m1.607s sys 0m0.177s I just did a rpm --rebuilddb which shrinked /var/lib/rpm from 227 MB to 121 MB (biggest saving: Packages shrinked from 200 MB to 104 MB) which also reduces the time for rpm -qa: # echo 3 > /proc/sys/vm/drop_caches cb@geeko:~> time rpm -qa | wc -l 3071 real 0m21.569s user 0m1.715s sys 0m0.322s Needless to say that the limiting factor is the harddisk ;-) (actually, it's a RAID1 with two disks in my > 4 years old laptop - and yes, I should buy a new one with a SSD ;-) Nevertheless, the performance with cold cache is quite bad - I just tried cat $300_mb_file > /dev/null and it took 4 seconds. Why does reading /var/lib/rpm/ (227 MB) take 1:37 minutes (or still 21 seconds after --rebuilddb)? Maybe a good workaround would be cat /var/lib/rpm/Packages > /dev/null ; rpm -qa which I expect to be much faster than a simple rpm -qa Yes, this is a serious proposal ;-) # echo 3 > /proc/sys/vm/drop_caches cb@geeko:~> time (cat /var/lib/rpm/Packages >/dev/null ; rpm -qa|wc -l ) 3071 real 0m5.837s user 0m1.599s sys 0m0.293s No comment :-/ Regards, Christian Boltz -- Untersuchungen, wie viele der "RSS ist tot"-Blogbeiträge per Newsfeed gelesen worden sind, sind uns nicht bekannt. [http://www.heise.de/newsticker/meldung/Facebook-Twitter-und-der-Tod-von-RSS-...] -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org