Improve Boot-up Times in Manjaro Linux with ‘readahead’

‘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.

'systemd-readahead' man page - Manjaro 0.8.7.1

I was not impressed by the boot-up times of Fedora 19 (compared to Ubuntu 13.04), but there are other things that affect the boot-up times of an OS (such as additional services for instance).

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%.

Boot-up Times, before & after installing 'readahead' - Manjaro 0.8.7.1

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.

12 thoughts on “Improve Boot-up Times in Manjaro Linux with ‘readahead’”

  1. thx, dropped my manjaro boot times to half.
    imagine what it would do to my other real arch partition that is already fast.

    but does it works also on other distros that are fully systemd compatible?

    • Hi Robin,

      ‘systemd-readahead’ is ‘systemd’s own ‘readahead’ implementation and comes in-built by default. So yes, it should be there already on a ‘systemd’ based OS, according to my knowledge.

  2. This is not working on Manjaro 0.8.11.
    I get this error:
    svante@Freja ~]$ sudo systemctl enable systemd-readahead-collect systemd-readahead-replay
    [sudo] password for svante:
    Failed to execute operation: No such file or directory
    [svante@Freja ~]$

    Why doesn’t it work for me?

  3. You can use vmtouch instead, if you’re really that heartbroken. It isn’t automatic, you have to build a directory of symlinks (/etc/vmtouch) to all the files you want pre-loaded (early on by systemd). “lsof -F n | grep .so.” and “ps axo cmd” are a couple of commands to get you started. Yea, and, Bash is your friend.

    Expect marginal improvements. A couple of seconds off a systemd bootup, and desktop apps open up the first time like they do when you re-open them right after closing them.

    In all, probably why readahead fell out of maintenance.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: