yum, can it be faster?

April 16th, 2008 mysurface Posted in Admin, yum | Hits: 54315 | 11 Comments »


Recently I install fedora to my laptop instead of ubuntu or any debian based distro, the application that I concern the most is yum. I have bad experience on yum previous during fedora core 5, which I find it extremely slow. Therefore I search for some guidelines from my friend Kagesenshi who are extremely active in Malaysia Fedora Community.

First question I throw to him is, Can yum be faster? He throws me back lots of tips over the IRC. Yeah! there are many tips indeed to make yum run faster, he wrote a post reviews all his kungfu on yum, don’t miss out his post, click here. Yum support plugins, one of them is Fastest Mirror, what this plugin does is it scan for the nearest mirror and pick the fastest one for you.

One of the yum’s shortcomings that bothers me so much is the latency of package searching, to search for available package, let say kmess, I do this:

yum search kmess

To do the same thing under apt, I do this

apt-cache search kmess

Seriously, apt-cache really out performs yum. One of the ‘feature’ that yum provides me is ‘intelligently’ do cache update when I ask for package searching. I really don’t understand the reason of such design. Why would it want to do the cache update when I just instruct it to do the package searching?

Well, I need to specified -C to force yum to do the package searching through the current available cache like this:

yum -C search kmess

It doesn’t really improve the speed of searching, but at least it do away the unexpected auto cache update.

I figure out a way which will makes my search faster, but for that I need to do some manual work before searching. One of the option yum support is to list all the packages which is either available or installed, well I can extract them into a file like this.

yum list all > yum-cache.txt 

The result will look like this:

ConsoleKit-x11.i386                      0.2.3-3.fc8.1          installed
GConf2.i386                              2.20.1-1.fc8           installed
GConf2-devel.i386                        2.20.1-1.fc8           installed
ImageMagick.i386                         installed
MAKEDEV.i386                             3.23-1.2               installed
MySQL-python.i386                        1.2.2-4.fc8            installed
SILLY-devel.i386                         0.1.0-4.fc8            updates
SIMVoleon.i386                           2.0.1-7.fc8            fedora
SIMVoleon-devel.i386                     2.0.1-7.fc8            fedora
SOAPpy.noarch                            0.11.6-6.fc7           fedora
ScientificPython.i386                    2.6-10.fc8             fedora
ScientificPython-devel.i386              2.6-10.fc8             fedora

Yeah, with that list now, I can search my package using grep

grep kmess yum-cache.txt

Or simply open it with less for consequent search

less yum-cache.txt

Yum list doesn’t extract the details package’s description, in case you need to search through the detail info, you can extract the detail info like this:

yum info all > yum-info.txt

Fedora 9 is on its way to us, lets see whether can yum be faster this time.

Some may suggest to use apt-rpm, but will apt-rpm as fast as apt-deb?

11 Responses to “yum, can it be faster?”

  1. You can cache the yum meta data – that will make things much faster. Edit the /etc/yum.conf and set the ‘metadata_expire’ as ‘2592000’ or so. See the manual for details.

  2. Binny: Yeah, I do that also, it increase expiration to almost infinity, so it will do away the unexpected auto cache update, It does become faster, but still cannot compete with the speed of apt-cache.

  3. […] yum, can it be faster? […]

  4. Oh – OK. Sorry – I misunderstood your question. I too hope yum will get faster.

  5. Binny: may be I should consider apt-rpm :p

  6. I wanted to thank you for this informative read of the subject. I definitely savored every little bit of it and I submitted your site to some of the biggest social networks so others can find your blog.

  7. It is really a great and helpful piece of information.I’m glad that you shared this helpful information with us.Please keep us informed like this.Thanks for sharing.

  8. I run a reasonably hot pop star chitchat website, and to stay on top of things, I use marketplace pulse tools.Your website has been firing up certain Alexa triggers, and I thought I’d check it out and look into if I could understamd what all of the buzz was about.

  9. tnx admin

  10. eggleton44 Says:

    One of the yum

  11. tnx admin…great halpeful

Leave a Reply