Perhaps, it’s worth starting with the fact that starting with Karmic Koala in Ubuntu, über-readahead or just
ureadahead has been used to speed up the download. Prior to that, as far as I could find out from the pieces of information, a similar development from the Fedora distribution kit, sreadahead, was used. Ureadahead is the development of the ubuntoids themselves. I could not find descriptions of specific advantages of ureadahead before sreadahead, so the reasons for the transition remained a mystery to me.
How it works: on first boot, the program keeps track of all the files that ubuntu reads from the disk. At the end of the startup process of the graphical environment, the list of these files is recorded in special files (packs) in the "/ var / lib / ureadahead /" directory. It seems to me that they also contain data on the location of the monitored files on the disk, but I can’t say for sure (there is very little information about ureadahead and it is scattered). Further, the program uses this data to pre-read files in the cache, thereby speeding up the launch of the OS.
The problem is that the work of ureadahead requires its support in the kernel. Ureadmills for ureadahead are not sent to the upstream because “it will be a different way to make a patch, but it’s better to make a patch.” functions have not been included in the core yet.
')
So here. Usually I take the kernel sources in
ppa of ubuntush kernel developers , since there are the freshest kernels with superimposed ubunthoid patches. But support for ureadahead is not included! And this is unpleasant, because without this support, ureadahead can only use ready-made packs, but cannot create new ones. From here we have losses in loading speed.
The patch to enable ureadahead support can be taken in the source code of the program itself. You can get them with the command “apt-get source ureadahead” or download them from the
lunchpad . The patch is in the root directory of the source. We superimpose it and collect the core. When configuring, make sure that the option "Kernel hacking -> Tracers -> Support for tracing block io actions" is enabled. For the rest we compile as usual.
After installing the kernel and checking its operation, you need to update the ureadahead packs. They are updated in the following cases:
- After a month since the inception
- After installing the package, which adds or modifies the init-scripts or configs
- In the absence of ready-made packs in / var / lib / ureadahead /
We are best suited to the last update method: delete from the directory "/ var / lib / ureadahead /" everything
except the debugfs folder . Next, reboot and wait for the desktop to start. It is better to wait a couple of minutes, for fidelity. If after that a file "pack" and several files with the extension ".pack" appeared in "/ var / lib / ureadahead /", then everything worked out. The next download will be much faster.
And finally: the patch of vanilla is also superimposed (I tried 2.6.32.8), so users of other distributions can also try ureadahead in action. ;)