Ubuntu Readahead boot profiling, and Bootchart
Posted by Hodge on Feb 24, 2008 in Technology, Ubuntu • 4 comments •
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.
|
|
Lof of 25 DELL CORE 2 DUO LAPTOP XP COMPUTER NOTEBOOK 1 $6,974.97 |
|
|
LOT OF 20 DELL INSPIRON LAPTOP NOTEBOOK COMPUTER $5,918.00 |
|
|
Lot 6 New HP G60 15.6 Laptop Notebook Win 7 HDMI Webcam $3,149.95 |
|
|
Lof of 10 DELL CORE 2 DUO LAPTOP XP COMPUTER NOTEBOOK 1 $2,819.97 |
|
|
NEW HP ENVY 17 Laptop Core i7 EXTREME i7-920XM Notebook $2,699.00 |
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.






[...] with boot profiling, this does speed up my boot time by a small, but noticeable amount. These icons link to social [...]
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
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:
exitand 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.lstand 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=100Save, 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.
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.