Ubuntu: Ureadahead slows down boot process on Ubuntu 12.04



Question:

I'm using Ubuntu 12.04 64bit installed on a WD Velociraptor (10.000 rpm) hard disk. I'm not using Wubi, it's a clear install.

I think that "adding swap" procedure on boot takes too long. At first I thought that it has something to do with the swap mounting, but as you can see, I've spotted the problem in the "ureadahead" deamon.

You can see below dmesg partial output:

  [    5.347709] Console: switching to colour frame buffer device 210x65  [    5.351756] fb0: VESA VGA frame buffer device  [    5.613411] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)  [   21.421858] Adding 1227772k swap on /dev/sda5.  Priority:-1 extents:1 across:1227772k   [   21.425834] ADDRCONF(NETDEV_UP): eth0: link is not ready  [   21.425841] ADDRCONF(NETDEV_UP): eth1: link is not ready  

Complete dmesg output

Taking into account my hard drive's speed, this delay is not normal.

After upgrading to the latest kernel (3.2.0.36 from 3.2.0.35) or after removing "/var/lib/ureadahead/pack" file, the problem is temporary solved, just for one boot.
After the second boot the problem returns.

This is the dmesg output when everything works perfect:

[    5.120096] Console: switching to colour frame buffer device 210x65  [    5.124150] fb0: VESA VGA frame buffer device  [    5.285586] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)  [    6.953086] Adding 1227772k swap on /dev/sda5.  Priority:-1 extents:1 across:1227772k   [    7.516909] ADDRCONF(NETDEV_UP): eth0: link is not ready  [    7.516916] ADDRCONF(NETDEV_UP): eth1: link is not ready  

Complete dmesg output

As suggested in the comments I've tried to disable the swap mounting and the delay was moved to the next process, so it seems that it has nothing to do with swap mounting:
dmesg output:

[ 5.862973] EXT4-fs (sda3): recovery complete   [ 5.887252] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)   [ 17.589428] ADDRCONF(NETDEV_UP): eth0: link is not ready   [ 17.589435] ADDRCONF(NETDEV_UP): eth1: link is not ready  

@gertvdijk noticed that in the latest dmesg output my system recovered from something, but this just happened just when I've comment out the swap from "/etc/fstab".

I've spoted the problem
Ureadahead slows down the boot process. This is weird since the opposite should happen!
Below I'm posting bootchart images and dmesg output of three different boots:

  1. Without ureadahead (disabled following this guide) there is no delay:
    dmesg output (ureadahead disabled)
    bootchart output (ureadahead disabled)
  2. With ureadahead enabled first boot (pack file is build for the first time) no delay:
    dmesg output (ureadahead enabled)
    bootchart output (ureadahead disabled)

  3. With ureadahead enabled second boot (ureadahead full working) delay is back:
    dmesg output (ureadahead enabled second boot)
    bootchart output (ureadahead disabled second boot)

NOTE
My question seems to be a duplicate of this Very slow boot due to mounting filesytem which concerns Ubuntu 11.04 and has no solution yet! If any admin reading this, I don't know if I have to delete my question as a duplicate since the problem doesn't seems to be the swap mounting... if so, delete it, or please, inform me to do so!


Solution:1

Try e4rat, it's faster and reliable

ppa https://launchpad.net/~trinitronx/+archive/minimal-no-ureadahead

how to use http://www.howtogeek.com/69753/how-to-cut-your-linux-pcs-boot-time-in-half-with-e4rat/


Solution:2

Do a clean install of Ubuntu 13.10, it is the latest updated Ubuntu version. Your problems might be fixed under that version, updates always fix problems.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »