Page 1 of 1

Speeding up boot with systemd

Posted: 02 Oct 2013, 09:10
by viking60
It was time to knock of a few seconds on my boot process again.
In the good old days that could be quite a tiresome process, but with systemd it is easy:

Code: Select all

sudo systemctl enable systemd-readahead-collect systemd-readahead-replay

That is all you have to do.

So while you are dancing for joy :dance1 you reboot...
....and find out that your box actually boots slower.
(At this point you will be ready to stop these services and declare me an idiot for giving this tip. :-D )

Don't worry - your computer needs to collect and structure data the first times.
On the second boot it will be as fast as it was - and on the third boot you will have gained 5 sec and so on until it is optimal.
This service will also defragment and rearrange files on disk to optimize subsequent boot times.
The data are collected in the file /.readahead
so you can check what has been collected with

Code: Select all

cat /.readahead

The best way to find out how much you have saved is by doing

Code: Select all

systemd-analyze

...before you start the services - and after.

more here

Re: Speeding up boot with systemd

Posted: 08 Oct 2013, 08:58
by dedanna1029
:s

Re: Speeding up boot with systemd

Posted: 25 Oct 2013, 10:17
by viking60
Just check that you do not already have a /.readahead
Distros may have already implemented it .

Re: Speeding up boot with systemd

Posted: 26 Oct 2013, 23:40
by dedanna1029
Oooooohhh... so that's the file that the NSA snags then.

(*joke,no worries)

Re: Speeding up boot with systemd

Posted: 26 Oct 2013, 23:47
by viking60
Well let us hope that your next president has some authority - enough to control the NSA.
Comments about the guy in power right now = censored