I want to speed up the boot time, and I followed a tip to:
- Edit "/etc/default/grub" and change the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
toGRUB_CMDLINE_LINUX_DEFAULT="quiet splash profile"
; - Run
sudo update-grub2
and boot up the machine; - Edit the grub config file again and remove
profile
fromGRUB_CMDLINE_LINUX_DEFAULT
; - Update grub again and reboot.
But the result was a increase of a boot time of 10 sec according to dmesg
output!
What went wrong? Why this tip doesn't work for me? How to revert this setting? Where this profile file is saved in Xubuntu? Can I delete this new profile with no problems?
One remark at the beginning: Although you're content with Ubuntu 13.10, I would still highly recommend upgrading to 14.04 LTS. Saucy has reached end-of-life for over a year now, which means you did not receive any updates for it since then - not good security-wise. Also, technically EOL releases are off-topic here.
The kernel boot parameter
profile
is a trigger for readahead profiling at boot-time. If it is set areadahead
daemon will monitor the boot process , look for files that are loaded during boot and write an appropriate list file. This file will be used on the next boot and should cut down boot-time by reducing hard-drive seeks.There are a few such readahead mechanisms that came and went over the years. Here is my take on them and I hope this to be more or less accurate.
Original
readahead
(deprecated)The last version found in the the Ubuntu archives dates back to 2005. You can't install it anymore through the repository. I don't know when it was superseeded, but it must have been sometime before 10.04.
/etc/readahead/boot
.boot
and booting with kernel parameterprofile
, although this bug report suggests its an undocumented and developer-only option.readahead
from FedoraOriginally from Fedora and still used there for systems not booting with
systemd
.readahead-fedora
. Available through the repository.readahead
/etc/readahead.d/custom.{early,later}
touch /readahead_collect
orprofile
on boot.ureadahead
The original
readahead
andreadahead-fedora
created a list of files needed at boot time. This list would be read at boot in an order that minimizes hard-drive seeks.ureadahead
This is the default on Ubuntu since - I think - 10.04.
/var/lib/ureadahead/pack
. To force profiling at next boot, remove this file.dpkg
triggers, that fire and update the page file whenever something is installed that relates toinit
.Ubuntu >= 15.04
systemd
is the default init system since vivid. It brought its own readahead mechanism.ureadahead
does not work withsystemd
. But evensystemd-readahead
is now unmaintained and deprecated, since apparently everbody owns a SSD these days...ureadahead
is used on Vivid when booting withupstart
.As expected your system has
ureadahead
installed, which doesn't take theprofile
parameter. Why you would experience prolonged boot time after setting profile is not understandable. If you also applied the second hack in the how-to you followed (CONCURRENCY=...
), this might be the culprit.upstart
should take care of that on its own.As said before, to force
ureadahead
to re-profile, remove thepack
fileand possibly any other
.pack
in that directory. Be sure to login quickly after boot, becauseureadahead
records a bit even after booting has finished. This way it will hopefully also include the unity shell or whatever you're using.If you want a really good grasp on what is taking how long to start, take a look at bootchart. It generates a graphical representation of the boot process.