<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>I Can Has Linux? &#187; boot</title>
	<atom:link href="http://icanhaslinux.com/category/boot/feed/" rel="self" type="application/rss+xml" />
	<link>http://icanhaslinux.com</link>
	<description>Invisible Patent Infringement!</description>
	<lastBuildDate>Mon, 29 Aug 2011 13:37:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Making Ubuntu boot in 19 seconds, pt2</title>
		<link>http://icanhaslinux.com/2007/09/14/making-ubuntu-boot-in-19-seconds-pt2/</link>
		<comments>http://icanhaslinux.com/2007/09/14/making-ubuntu-boot-in-19-seconds-pt2/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 17:24:52 +0000</pubDate>
		<dc:creator>LightningCrash</dc:creator>
				<category><![CDATA[boot]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://icanhaslinux.com/2007/09/14/making-ubuntu-boot-in-19-seconds-pt2/</guid>
		<description><![CDATA[I wrote before about my experiments in Ubuntu boot times and mentioned doing a fresh install and just disabling the dhcp and network manager. I got a lot of good input and wanted to expand upon that. Setup My secondary workstation is a Dell GX270 with a 3.0GHz P4 processor, 1GB of RAM and a [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote before about my <a href="http://icanhaslinux.com/2007/08/28/making-ubuntu-boot-in-19-seconds/">experiments in Ubuntu boot times</a> and mentioned doing a fresh install and just disabling the dhcp and network manager. I got a lot of good input and wanted to expand upon that.</p>
<p><span style="font-weight: bold; color: #000000; font-size: 130%">Setup</span><br />
My secondary workstation is a Dell GX270 with a 3.0GHz P4 processor, 1GB of RAM and a 40GB Seagate ST340014A hard drive. I blew away the existing install <strong>again</strong>, reinstalled Feisty with the default settings, specified my static IP, and updated via apt-get. The current kernel version is 2.6.20-16-generic i686.</p>
<p><span style="font-weight: bold; color: #000000; font-size: 130%">Getting started</span><br />
I installed bootchart via <code>sudo apt-get install bootchart</code> and rebooted. My boot time was 29 seconds.<br />
My /etc/network/interfaces file again contained entries for eth1, eth2, ath0 and wlan0. I deleted all of these.<br />
Again, the if-up, if-down, and pre and post-up had entries for wireless and avahi stuff i didn&#8217;t want, so I removed the following<br />
<code>sudo -s<br />
rm /etc/network/if-down.d/avahi-autoipd<br />
rm /etc/network/if-post-down.d/wireless-tools<br />
rm /etc/network/if-pre-up.d/wireless-tools<br />
rm /etc/network/if-up.d/avahi-autoipd<br />
rm /etc/network/if-up.d/avahi-daemon<br />
exit<br />
</code></p>
<p>I rebooted and checked my boot time again</p>
<p>I <a href="http://ubuntuforums.org/showthread.php?t=254263">reprofiled my boot sequence</a>, then rebooted: 23 seconds.</p>
<p><span style="font-weight: bold; color: #000000; font-size: 130%">Sysv-rc-conf</span><br />
At this point I installed and fired up sysv-rc-conf   (sudo apt-get install sysv-rc-conf)<br />
I disabled the following:</p>
<blockquote><p> bluetooth<br />
cupsys<br />
hotkey-setup<br />
hplip<br />
powernowd<br />
rsync<br />
wpa-ifupdown</p></blockquote>
<p>Boot time after removing the services: 22 seconds</p>
<p>At this point, bootchart seems to be limited by a few particular processes:<br />
Disk-related:<br />
khubd<br />
scsi_eh 1<br />
modprobe<br />
rc</p>
<p>CPU Related:<br />
udevd<br />
ckbcomp<br />
hald<br />
Xorg</p>
<p>It looks like udevd is still loading wacom junk<br />
<code>sudo find /etc -name '*wacom*' -type f -delete</code><br />
hehe, took care of that.<br />
I also <a href="http://tvease.net/wiki/index.php?title=Tweak_ubuntu_for_speed#Concurrent_Booting">enabled concurrent shell scripts</a> while I was at it.<br />
Still at 22 seconds.<br />
I cleaned up /etc/acpi, as there were a ton of modules loaded that I didn&#8217;t use: 22 seconds.<br />
I installed prelinking and then rebooted: 22 seconds.<br />
I blacklisted ipv6 and a handful of other modules that were loaded for no reason whatsoever: 22 seconds.<br />
I reprofiled and rebooted: 20 seconds.<br />
At this point it looks like readahead itself takes up about 5 seconds of uninterruptable I/O.</p>
<p>Now to try out some of the stuff that my readers posted.<br />
mgarces said to try initNG. So I grabbed the deb files for initng and the initng ifiles from initng.org and did a dpkg -i initng*.deb<br />
But it didn&#8217;t boot&#8230;&#8230;so I googled and ran <a href="http://ubuntuforums.org/showthread.php?t=80423&amp;highlight=modules">across this page</a>. I followed the directions there and got it to boot. HAL is complaining and I don&#8217;t feel like troubleshooting it right now.<br />
But wait, bootchart isn&#8217;t working either. Crap.<br />
Oh, even better, eth0 didn&#8217;t come up.<br />
sudo dpkg -r initng<br />
sudo dpkg -r initng-ifiles<br />
Bye-bye initng!</p>
<p>So I figured, why not play with the schedulers?<br />
CFQ=22 seconds<br />
deadline=23 seconds<br />
noop=23 seconds<br />
as=23 seconds</p>
<p>So, even now, nothing really helps.</p>
<p>Well, I&#8217;m really getting burned out, maybe there will be a part 3 for this sometime.</p>
<p>Until next time!<br />
-LightningCrash</p>
]]></content:encoded>
			<wfw:commentRss>http://icanhaslinux.com/2007/09/14/making-ubuntu-boot-in-19-seconds-pt2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Making Ubuntu boot in 19 seconds</title>
		<link>http://icanhaslinux.com/2007/08/28/making-ubuntu-boot-in-19-seconds/</link>
		<comments>http://icanhaslinux.com/2007/08/28/making-ubuntu-boot-in-19-seconds/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 17:05:00 +0000</pubDate>
		<dc:creator>LightningCrash</dc:creator>
				<category><![CDATA[boot]]></category>
		<category><![CDATA[readahead]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://icanhaslinux.com/2007/08/28/making-ubuntu-boot-in-19-seconds/</guid>
		<description><![CDATA[ForewordI started to take it upon myself to speed up the boot process of my secondary workstation, but I decided I needed a way to quantitatively measure the boot process. I wanted to document my results in a way that could be reproduced, and I wanted to be very methodical in the process. SetupMy secondary [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight:bold;color:rgb(0, 0, 0);font-size:130%;">Foreword<br /></span><span style="color:rgb(0, 0, 0);">I started to take it upon myself to speed up the boot process of my secondary workstation, but I decided I needed a way to quantitatively measure the boot process. I wanted to document my results in a way that could be reproduced, and I wanted to be very methodical in the process.</span></p>
<p><span style="font-weight:bold;color:rgb(0, 0, 0);font-size:130%;">Setup<br /></span><span style="color:rgb(0, 0, 0);">My secondary workstation is a Dell GX270 with a 3.0GHz P4 processor, 1GB of RAM and a 40GB Seagate ST340014A hard drive. I blew away the existing install, reinstalled Feisty with the default settings, specified my static IP, and updated via apt-get. The kernel is 2.6.20-16-generic  #2 SMP i686.</span><br /><span style="color:rgb(0, 0, 0);">To measure the boot times, I turned </span><a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_automatic_login_into_GNOME">Automatic Login</a><span style="color:rgb(0, 0, 0);"> on for my user account. Then I made a file called imup.sh in my home directory, with the following contents, and put it in my session startup:</span><br /> <span style="color:rgb(0, 0, 0);"><span style="color:rgb(255, 153, 0);">nc mymaindesktop 89 -z</span><span style="color:rgb(0, 0, 0);"></p>
<p>This meant that when GNOME was up and running, my secondary desktop would attempt a TCP connection to my primary desktop. This I can quantify. First, I got a root shell by executing &#8216;<span style="color:rgb(255, 153, 0);">sudo -s</span>,&#8217;   and then I  typed the following command into my console:<br /><span style="color:rgb(255, 153, 0);">time nc -l -p 89 -vvn</p>
<p><span style="color:rgb(0, 0, 0);">I don&#8217;t execute it just yet. I hit the power button on my test machine and the Enter key on my primary desktop simultaneously. When the test machine hits the desktop, I&#8217;m presented with output similar to the following on my main desktop:</p>
<p><span style="color:rgb(255, 0, 0);">listening on [any] 89 &#8230;</span> <span style="color:rgb(255, 0, 0);">connect to [10.1.1.1] from (UNKNOWN) [10.1.1.2] 30958</span> <span style="color:rgb(255, 0, 0);"> sent 0, rcvd 0</span>  <span style="color:rgb(255, 0, 0);">real    0m46.919s</span> <span style="color:rgb(255, 0, 0);"><br />user    0m0.000s</span> <span style="color:rgb(255, 0, 0);"><br />sys     0m0.004s</span><br /></span></span>So at this point, I know it took about 47 seconds to boot all the way to the GNOME desktop from a cold start. I repeat all my tests 3 times to make sure that the number is accurate. In the descriptions of each boot, save the Base Install, I&#8217;ll try to link to a page detailing how to replicate my process.<br /></span></span><span style="color:rgb(0, 0, 0);"><span style="color:rgb(0, 0, 0);"><br /><span style="font-weight:bold;font-size:130%;">Some Results</span><br />Base Install (Fresh install, updated via apt-get):</span></span><span style="color:rgb(255, 153, 0);"><span style="color:rgb(0, 0, 0);"><span style="color:rgb(0, 0, 0);"> 47 seconds<br /></span><a href="http://bin-false.org/?p=10">Prelinking installed and run</a><span style="color:rgb(0, 0, 0);">: 49 seconds<br /></span><a href="http://www.zolved.com/synapse/view_content/28311/Tune_Boot-Up-Manager_for_better_performance_of_Ubuntu">Disabling hplip</a><span style="color:rgb(0, 0, 0);">: 47 seconds<br /></span><a href="http://ubuntuforums.org/showthread.php?t=89491">Disabling various services</a><span style="color:rgb(0, 0, 0);">: 49 seconds<br /></span><span style="color:rgb(0, 0, 0);">(I also disabled brltty in the above)<br /></span><span style="color:rgb(0, 0, 0);">Running prelink again after the above: 47 seconds</span></p>
<p><span style="font-weight:bold;font-size:130%;">Bootchart</span><br />At this point, I installed bootchart via apt-get ( <span style="color:rgb(255, 153, 0);">sudo apt-get install bootchart</span>) and rebooted.<br />Then I began to examine just what was using up the most time during my boot process.<br />It looks like under S40Networking, dhclient is being run and then executing a sleep. Funny because I have specified a STATIC IP. So I went into /etc/network , and edited out all of the extra interfaces from /etc/network/interfaces. Only eth0 and lo remained. I also went into all of the directories inside /etc/network and moved all of those files to backup folders elsewhere. I don&#8217;t use avahi and I don&#8217;t use WPA, so those things shouldn&#8217;t run, right? So I removed those and went along my way.</p>
<p>But wait, bootchart tells you how long it took to boot! Which, after removing those files, appears to have decreased from 30 seconds to 24 seconds. Now we&#8217;re getting somewhere, and this article is going to take a different turn.</p>
<p><span style="font-size:130%;"><span style="font-weight:bold;">Avahi</span></span><br />Next, remember how I removed the avahi bits from /etc/network/? Avahi is still running. I don&#8217;t care to discover what&#8217;s on my network, and I want it to go. I just have to edit /etc/defaults/avahi and set that =1 to =0. If all goes well, it won&#8217;t run next boot.</p>
<p><span style="font-style:italic;">25 seconds.</span><br />Oh well.</p>
<p><span style="font-size:130%;"><span style="font-weight:bold;">More Results</span></span><br />Next, I <a href="http://tvease.net/wiki/index.php?title=Tweak_ubuntu_for_speed">enabled concurrent init shell scripts.</a>: 24 seconds.<br />I <a href="http://ubuntuforums.org/showthread.php?p=372831">disabled usplash</a>: 24 seconds<br />I <a href="http://ubuntuforums.org/showthread.php?t=254263">reprofiled the bootup and restarted</a>: 20 seconds<br />I went into /etc/readahead/ and edited every line containing hlip, blue, or avahi from the files boot and desktop: 20 seconds<br />I disabled readahead altogether: 25 seconds<br />Turned readahead back on, reprofiled: 20 seconds</p>
<p><span style="font-size:130%;"><span style="font-weight:bold;">Trying to optimize readahead</span></span><br />Next, I sorted through the /etc/readahead/boot file and sorted out the list by time last accessed.<br />Which did nothing, because readahead had accessed them all in the order that they were in /etc/readahead/boot.<br />So I disabled readahead, rebooted, and went back through and sorted the list again. Some of the files had not been accessed in the past 24hrs, or in the last boot, so I omitted those from the list.<br />This made the boot time 22 seconds. Oops. Maybe I shouldn&#8217;t have omitted those files that haven&#8217;t been accessed in the last 24hrs.<br />Out of the blue, I removed ipv6 from the modules list: 21 seconds<br />So I sorted the original list again, and didn&#8217;t prune anything from the list: 21 seconds<br />I put the original list back: 20 seconds<br />I <a href="http://kahrn.wordpress.com/2007/08/22/getting-rid-of-the-kinit-warning-on-buntu-704-bootup/">disabled the kinit resume</a> function: 20 seconds<br />I blacklisted xpad, the Xbox controller module: 20 seconds<br />Next, I went into the BIOS and disabled all of the stuff I didn&#8217;t need, like the floppy controller, serial ports, parallel port, etc: 20 seconds<br />I disabled the wacom lines in xorg.conf, and turned on boot logging:  20 seconds<br />I noticed that something to do with Wacom was still being loaded, so I went through all of the /etc/rcX.d directories and disabled them: still at 20 seconds<br />I don&#8217;t have a printer connected to this computer, nor will I ever, so I disabled cups: 19 seconds<br />I found that /etc/inittab does nothing now. The extra ttys are spawned in /etc/event.d, so I removed tty3, 4, 5, and 6, then rebooted: 19 seconds<br />Next, since I have a static IP and a completely static connection, I removed the packages for dhcdbd, network-manager, and network-manager-gnome, then rebooted: 19 seconds.<br />I generated another initramfs: 19 seconds.</p>
<p>I could go further, since I have no need for sound, or anacron, but at this point I&#8217;m severely I/O limited, according to the bootchart. Maybe 90% of the boot process is spent in I/O wait. I doubt disabling those will even shave a half second off of my boot times.</p>
<p>Just for kicks, I removed bootchart and tried out my old method three times: It takes 40 seconds to get to a desktop from the moment I push the power button. Not too shabby for older hardware.</p>
<p><span style="font-weight:bold;font-size:130%;">Conclusion</span><br />All in all, it looks like the best speedups to get are from:<br />  1. <a href="http://ubuntuforums.org/showthread.php?t=254263">Reprofiling with readahead</a><br />  2. Setting a static IP for your network (if you&#8217;re a desktop user like me)</p>
<p>Everything else was just a waste of time. At a later date I may reinstall, then simply try the reprofiling and disabling DHCP, and see how long that takes. If I had a dual-core CPU, I may have seen a benefit from concurrency. At this point it seems like the easiest way to speed up boot even more would be to use a faster/dual-core CPU or get faster disks. Maybe I&#8217;ll bring in my Seagate X15 from home and give that a shot.<br /></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://icanhaslinux.com/2007/08/28/making-ubuntu-boot-in-19-seconds/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

