Slow updating portage cache

06 Oct

Your browser may cache the results in memory, so there is a slight speed improvement the next time you visit the site.

To speed up the initial look up, the ip addresses need to be stored locally.

This is long, but hopefully the brain dump is useful to you.

Ccache can greatly reduce the build time for these constantly updated packages, but here I’ll present some other tips & tricks.

This article is subjective, so please take what I say with a spoonful of salt. Finally, before I begin: I have a lot of reasons for moving away from Gentoo myself, and this article is mostly about why I don’t think Gentoo is a good idea for what I use computers for, but I don’t mean to criticize anyone or say it’s no good in general (in fact I know of some uses where it works great, and lots of places use it). This is simply the train of thought I went through when deciding not to use a source-based, continuous upgrade distribution for my own systems.

I recently switched away from Gentoo, after using it since 2001 or 2002.

Before dumping the results, I will explain how the used optimizations were achieved: Moving the build directory to RAM (tmpfs): This is easily done with the following command: So we actually mount a tmpfs instance over /var/tmp/portage (portage’s default build path), assign proper read/write privileges to the ‘portage’ user and group (preserving the original mode bits) and set a maximum size of 75% of your RAM.

As a side note, tmpfs mounts act as a stack: when you umount this tmpfs instance, the original /var/tmp/portage contents will be revealed underneath (more information in this excellent article).