Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Patching the Kernel for a faster startup time?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Tue Jan 12, 2010 7:04 pm    Post subject: Patching the Kernel for a faster startup time? Reply with quote

I'm using the 2.6.32-zen3 Zen-Sources kernel.

I've been reading about improving my bootup time by patching the kernel with some patches like these:

Code:

0001-moblin-add-a-EDID-cache.patch
0004-Don-t-blank-display.patch
0005-Ordering-kms-after-sata-in-drivers-Makefile.patch
0006-fastboot-remove-wait-for-all-devices-before-mounting.patch
0007-moblin-make-device-init-asyncronous.patch


My problem is first, the site that had these patches (last month)... no longer has them. They deleted them for some odd reason. No explaination as to why. The other thing is that I don't know whether I need them or not with the zen-sources kernel, as maybe I might already have some of these patches. I know I'm already using the fastboot option, but maybe this patch is something else.

Anyhow, one gentoo user on the forums here has had success in getting the patches working and he boots up in 13 seconds. So, I'm thinking that maybe I could install the patches as well... if I could only find them.
Back to top
View user's profile Send private message
cheater1034
Veteran
Veteran


Joined: 09 Sep 2004
Posts: 1558

PostPosted: Tue Jan 12, 2010 8:33 pm    Post subject: Reply with quote

If you have a light kernel it doesn't really take a long time before it starts init,
However you can add the "fastboot" boot parameter which will disable FS checks and certain device probing to speed up the boot process a little bit.

There have been sysvinit alternatives to speed up the process as well, such as init-ng or einit - which were made to be quicker/lighter.

My advice for faster boot due to kernel improvement:
Make an ultra light and ultra modular kernel configuration.

I'm not totally familiar about the fastboot option, but it does disable FS checking (not sure if there's a way to tell it not to disable it) which I wouldn't recommend.

There was "fastboot" which involved some time of async. operations which has been merged a release or two ago already - most of the patches you listed are probably hackish, etc. (and probably don't really improve bootup time more than a second)
_________________
IRC!: #zen-sources on irc.rizon.net
zen-kernel.org
--
Lost in android development land.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5884

PostPosted: Wed Jan 13, 2010 6:55 pm    Post subject: Reply with quote

One thing that _really_ makes a difference in boot time is readahead.

Using it (and a zen kernel) I can get my crappy eee701 (stock 630MHz) to a GDM prompt in 11 seconds. And that's just with Debian. Problem is there's no ebuild for it.
Back to top
View user's profile Send private message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Thu Jan 14, 2010 2:19 am    Post subject: Reply with quote

Ant_P wrote:
One thing that _really_ makes a difference in boot time is readahead.

Using it (and a zen kernel) I can get my crappy eee701 (stock 630MHz) to a GDM prompt in 11 seconds. And that's just with Debian. Problem is there's no ebuild for it.


No ebuilds??? Its in portage. I have it installed. It doesn't do anything though. It says that it needs checkroot however the checkroot service does not come with baselayout2. If anyone knows how to get around this... I would really appreciate it.

There is even a wiki on readahead for gentoo. However, its not been updated in 4 years or so.
Back to top
View user's profile Send private message
cheater1034
Veteran
Veteran


Joined: 09 Sep 2004
Posts: 1558

PostPosted: Thu Jan 14, 2010 4:17 am    Post subject: Reply with quote

Be sure to read:
https://bugs.gentoo.org/257207
as well as:
http://code.google.com/p/sreadahead/

You need the kernel to be patched as well, it seems like the dispute (in that bug) is that gentoo-sources doesnt include the patches.
However, zen-sources does 8)

But you're probably better off going the sreadahead route instead of readahead - i have no experience with either personally.
_________________
IRC!: #zen-sources on irc.rizon.net
zen-kernel.org
--
Lost in android development land.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Thu Jan 14, 2010 5:42 am    Post subject: Reply with quote

I'm quite happy to guinea pig this.

As it's been removed from tree, had to add to a local overlay
am on the latest stable zen kernel, so...let's see if I can break anything!

Had to remove the kernel patch portions from the ebuild since I'm already patched - now just need to find out where the hell the init scripts are.

If I can get it working I'll post back with a description.

EDIT: jesus this ebuild needs some work. Hopefully this isn't one of the dozen things I start and never finish because a bowel movement distracts me.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2273
Location: Bardowick, Germany

PostPosted: Thu Jan 14, 2010 9:37 am    Post subject: Reply with quote

The biggest speedup can be achieved by a) using openrc+baselayout2 and b) not compressing your kernel.
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2542
Location: Near Toronto

PostPosted: Thu Jan 14, 2010 1:27 pm    Post subject: Reply with quote

Quote:
b) not compressing your kernel.


I wonder about this - I suspect my machine can decompress
faster than the disk can deliver data
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5884

PostPosted: Thu Jan 14, 2010 2:08 pm    Post subject: Reply with quote

belikeyeshua wrote:
No ebuilds??? Its in portage. I have it installed. It doesn't do anything though.

It doesn't do anything because it's readahead-list you have installed. That package is obsolete junk. As I said, there is no ebuild for the fedora readahead in portage.
Back to top
View user's profile Send private message
cheater1034
Veteran
Veteran


Joined: 09 Sep 2004
Posts: 1558

PostPosted: Thu Jan 14, 2010 7:09 pm    Post subject: Reply with quote

Ant_P wrote:
belikeyeshua wrote:
No ebuilds??? Its in portage. I have it installed. It doesn't do anything though.

It doesn't do anything because it's readahead-list you have installed. That package is obsolete junk. As I said, there is no ebuild for the fedora readahead in portage.


I think he was referring to sreadahead, not readahead (sreadahead is not based on fedora's readahead at all)
_________________
IRC!: #zen-sources on irc.rizon.net
zen-kernel.org
--
Lost in android development land.
Back to top
View user's profile Send private message
Xytovl
Tux's lil' helper
Tux's lil' helper


Joined: 15 Mar 2009
Posts: 92

PostPosted: Thu Jan 14, 2010 7:48 pm    Post subject: Reply with quote

The patches you are talking about are in a tarball here : http://dl.free.fr/j797CoL2h
Back to top
View user's profile Send private message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Thu Jan 14, 2010 10:28 pm    Post subject: Reply with quote

Ok... I guess the question is... sreadahead or readahead?? From the ebuild, sreadahead is optimized for SSD's. As far as I know, my drive is not a SSD. So, should I use sreadahead anyway?

cach0rr0, let me know if you get anything accomplished on this! I really appreciate it.
Back to top
View user's profile Send private message
cheater1034
Veteran
Veteran


Joined: 09 Sep 2004
Posts: 1558

PostPosted: Thu Jan 14, 2010 11:12 pm    Post subject: Reply with quote

belikeyeshua wrote:
Ok... I guess the question is... sreadahead or readahead?? From the ebuild, sreadahead is optimized for SSD's. As far as I know, my drive is not a SSD. So, should I use sreadahead anyway?

cach0rr0, let me know if you get anything accomplished on this! I really appreciate it.


Probably the benefits are better seen on ssd's but you'd also most likely improve it on a regular HD too
_________________
IRC!: #zen-sources on irc.rizon.net
zen-kernel.org
--
Lost in android development land.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum