‘readahead’ is a utility that loads your boot-up services by based on their saved order on the rotational disk (also supports SSDs). This approach (rather than using the conventional way of loading them by their execution order) minimizes ‘seek times’ and ‘rotational delays’, and increases the disk’s throughput, which in return, shortens the ‘boot-up’ time.
This tool of course does not jeopardize the sequential order of service & program execution during the ‘booting’, as ‘readahead’ just reads and loads the data into the ‘page cache’ (a location on your RAM where program data is hold temporarily) from the primary storage media, and simply leaves the execution order up to the scheduler.
‘readahead’ is developed by Fedora and many distributions that use ‘systemd’ (a tool that governs the execution of services, during and after ‘booting’), including Fedora, usually come with it. It however is not the only one of its kind as Ubuntu has its own one called ‘Ureadahead’ as well.
Anyway, I recently reviewed Manjaro Linux and although it too comes with ‘readahead’, it is by default, disabled. This of course I did not know, until a Manjaro user revealed it to me (thanks ‘mips’), and recommend that I should try running Manjaro with it enabled.
So I took the advice and enabled it, then re-measured the boot-up times and as you can see below, ‘readahead’ was able to reduce the boot-up times by around 17%.
It also improves the boot-up times on SSDs, and
according to this page (Update: This link no longer is available because from recently, systemd has actually removed the readhead service because it’s no longer actively developed) if the file system supports it (such as ‘Ext4’), it also has the ability to defrag the files for improving the performance further too.
How to enable it on Manjaro ?
Step 1: It is really easy. Open your terminal window and enter the below command.
sudo systemctl enable systemd-readahead-collect systemd-readahead-replay
Step 2: Then reboot your computer, at least twice. After that, you should see an improvement (decrease) in your boot-up time. Good luck.