Ubuntu Readahead boot profiling, and Bootchart

Posted by on Feb 24, 2008 in Technology, Ubuntu4 commentsPrint This Post

I’ve been messing around, tweaking and poking my system in an attempt to optimise, and speed things up a little. Installing 2Gb RAM has helped, but I’ve also been playing trying to speed up my laptop’s boot time. I stumbled across a cool little application, called bootchart:

“boot sequence auditing and chart generator
bootchart allows you to audit the boot sequence of your computer and
generate a pretty chart of the processes run, including how long they
took and how much CPU and I/O they used.

The auditing is performed by adding a script to the top of your initramfs
which lives inside is own tiny filesystem during the boot process and
monitors the rest of the system booting”

(description from the Synaptic Package Manager)

So, I installed bootchart

sudo apt-get install bootchart

and rebooted to benchmark the boot time – 44 seconds (bootchart creates a cool png image in /var/log/bootchart each time the computer boots up). Not bad, but surely it could be a little better, right?

Aside from the obvious optimisation tricks of turning off unnecessary services, I’d also heard about readahead, which can be used to cache files to be loaded at boot time. To enable it, all I had to do was create a boot profile, which can be done via Grub at boot time. So, I rebooted again, and when the Grub boot list appeared, created the profile:

First, I highlighted the default boot option – actually it was already highlighted, since it’s what I usually boot into! – and pressed the “e” key. Then I scrolled down to the “kernel” line, and pressed “e” once again, which allows a temporary edit of the Grub boot command line. Moving the cursor to the end of the line, I added ” profile” (notice the space character before the word profile), pressed “Enter”, and booted. It took longer than usual, obviously, since readahead was creating the profile to, well, read ahead on the next, and all subsequent boots.

After my system had fully booted into Gnome, I rebooted, waited, then checked the bootchart log again. 42 seconds…

Oh well – a couple of seconds improvement is better than nothing! Back to the drawing board…


Something not quite right? Inaccuracies or invalid code? Didn’t work for you? Don’t like me using Ss instead of Zs? Add a comment below! All comments are welcome. Except spam, because spam is a bit crap.



Seis De Mayo


Seis De Mayo


$4.29


It wasn’t long after the recording of this, Trey Anastasio’s third–and most warmly idiosyncratic–solo album, that the Phish frontman/guitarist announced that his improvisation-fueled, cult-fave band would record no more. Longtime Phish-heads (or admirers of Anastasio’s previous free-form jazz excursions with Les Claypool and Stewart Copeland and more conventional solo work) may find this ambitio…

Sapphire Video Card 100314-3l Hd 6870 1gb Ddr5 256bit Pci Express D-Dvi/Hdmi/Display Port Retail


Sapphire Video Card 100314-3l Hd 6870 1gb Ddr5 256bit Pci Express D-Dvi/Hdmi/Display Port Retail


$222.69


PCI Express based PC is required with one X16 lane graphics slot available on the motherboard.4X75 Watt 6-pin PCI Express power connector is required for CrossFireX system.2X75 Watt 6-pin PCI Express power connector is required.1024MBMinimum of system memory.Installation software requires CD-ROM drive.DVD playback requires DVD drive.Blu-ray/HD DVD playback requires Blu-ray/HD DVD drive.Blu-ray/HD …

ASUS Lamborghini VX6-PU17-BK 12.1-Inch Eee PC Netbook (Black)


ASUS Lamborghini VX6-PU17-BK 12.1-Inch Eee PC Netbook (Black)


$685.70


Asus Lamborghini VX6-PU17-BK 12.1″ LED Netbook – Atom D525 1.80 GHz – Black VX6-PU17-BK 41…

T101MT-BU17-BK 10.1 Netbook


T101MT-BU17-BK 10.1 Netbook


$599.99


Asus Eee PC T101MT-BU17-BK 10.1″ LED Net-tablet PC – Atom N450 1.66 GHz – Black T101MT-BU17-BK 202…

CellularFactory: Laptop Computer Security Cable Lock (Silver) for Asus laptop


CellularFactory: Laptop Computer Security Cable Lock (Silver) for Asus laptop


$7.99


Laptop Computer Security Cable Lock (Silver) for Asus laptop . Laptop Computer Security Cable Lock for you to use to lock your laptop computer in an easy way.Features:Lock down your notebooks laptop computer with this unique, individual keys and locks for each computer. Galvanized steel cable for strong protectionEffective protection, anti-thief design keeps the sneakers away The T-bar mechanism b…

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: , , , , ,

4 comments

» Comments RSS Feed
  1. [...] with boot profiling, this does speed up my boot time by a small, but noticeable amount. These icons link to social [...]

  2. Well great, this hosed my system. Rebooted to

    ALERT /dev/disk/by-uuid XXXXXXXXXXXXXX does not exist

    Dropping to a shell
    busy box Ash
    initramfs
    _

    Then nothing

  3. Hi Charles,

    I’m sorry to hear that – I had the same error with an earlier Intrepid kernel update. It’s more of a temporary annoyance than a serious error, and easy to solve – just wait a few seconds after the error message appears, then at the “(initramfs)” prompt, type:

    exit

    and press return – booting should continue as normal. If the (initramfs) prompt doesn’t appear, just press the return key a couple of times first.

    Once your system has booted, open up a terminal, then edit the menu.lst:

    gksu gedit /boot/grub/menu.lst

    and add rootdelay=100 to the end of the kernel line, as follows:

    kernel /boot/vmlinuz-2.6.27-xx-generic root=UUID=xxxxxxxxxx ro splash rootdelay=100

    Save, and reboot – it should boot as normal.

    Finally, remember to apply this change to menu.lst with each new kernel update, or the issue will reoccur.

    I hope that helps.

  4. Hey, got a question about your blog. I noticed it loads pages lot faster than mine. Do you host your blog on dedicated server? thanks.

Leave a comment