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-replayThat is all you have to do.
So while you are dancing for joy
....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.
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 /.readaheadThe 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
