Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Boot faster? ideas and questions
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Fri Aug 01, 2003 7:32 am    Post subject: Boot faster? ideas and questions Reply with quote

i have an idea that i have functional on my system right now.

here it is.

i made a new startup and shutdown script that does things in parallel.

/etc/conf.d/customstartstop
then i add
/etc/conf.d/customstartstop to /etc/conf.d/local.start and local.stop

anything i have startup with customstartstop will also be shutdown properly. i have a number of things starting/stopping line this right now like:

esound &
gpm &
hotplug &
lisa &
nvtv &
samba &
distccd &
cupsd &
etc.

it works well for anything that doesnt have any boottime dependancies. it decreased my boot time by 5 seconds.

my question is, is it possible to add some sort of dependancy requierement to a local.start script?

like:
wait "net.eth0" /etc/init.d/samba
to make sure that samba doesn't try to start until eth0 is up?
Back to top
View user's profile Send private message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Fri Aug 01, 2003 7:32 am    Post subject: other ideas?? Reply with quote

anything to get linux to boot faster, any other ideas?
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Aug 01, 2003 9:08 am    Post subject: Reply with quote

The aforementioned script can be found here. Feedback on that thread also here please.

Puggy
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 18052

PostPosted: Fri Aug 01, 2003 3:50 pm    Post subject: Reply with quote

I try to shutdown as infrequently as possible. Otherwise, I don't think the wait is long. If I'm not mistaken, kernel modules slow down boot time.
Back to top
View user's profile Send private message
Safrax
Guru
Guru


Joined: 23 Apr 2002
Posts: 422

PostPosted: Fri Aug 01, 2003 4:00 pm    Post subject: Reply with quote

I've personally taken to hacking the bootscripts. /sbin/rc is one of the slower ones and with modifications basically commenting out unneeded if statements and if something will always be true, etc has really helped. I've also removed various boot scripts and combined them with others and used the "&" to parrallise (sp? word?) the scripts even more. From the point at which the kernel hands things over to the gentoo scripts it takes roughly 3 seconds to get a login prompt.
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Aug 01, 2003 5:11 pm    Post subject: Reply with quote

I generally occupy myself with getting some breakfast when my computer is powering on. Problem solved. And I don't ever need to reboot normally so I just power up in the morning and shutdown at night...

I can't believe boot time is a real issue for anyone unless it takes a really long time or they crash frequently, in which case they should fix their machine so it stops crashing... :-D

Puggy
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
aethyr
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1085
Location: NYC

PostPosted: Fri Aug 01, 2003 5:36 pm    Post subject: Reply with quote

Puggy, I don't think it's a big issue on desktops or servers.

But when I used to use a laptop for my job, I know the boot times would get a bit annoying. I know if I ever get a personal laptop in the future I'd appreciate booting in as little time as possible.
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Aug 01, 2003 5:58 pm    Post subject: Reply with quote

aethyr wrote:
Puggy, I don't think it's a big issue on desktops or servers.

But when I used to use a laptop for my job, I know the boot times would get a bit annoying. I know if I ever get a personal laptop in the future I'd appreciate booting in as little time as possible.


I'd know if I had a laptop. *sobs* :-D Point taken though.

Puggy
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Fri Aug 01, 2003 6:12 pm    Post subject: Reply with quote

Well, if you want us to figure out how to decrease boot times, you could just get us all some nice new laptops... ;)
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Aug 01, 2003 6:26 pm    Post subject: Reply with quote

Ian wrote:
Well, if you want us to figure out how to decrease boot times, you could just get us all some nice new laptops... ;)


Make mine a top of the line Vaio or a PowerBook please. :-D

Puggy
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Fri Aug 01, 2003 6:48 pm    Post subject: Reply with quote

I personally don't care how long it takes to boot. I only reboot after adding a new kernel, else the machines are always on.

Erik
_________________
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Back to top
View user's profile Send private message
wilburpan
l33t
l33t


Joined: 21 Jan 2003
Posts: 977

PostPosted: Fri Aug 01, 2003 9:25 pm    Post subject: Reply with quote

ebrostig wrote:
I only reboot after adding a new kernel, else the machines are always on.

Your laptop must have one hell of a battery, then. :D
_________________
I'm only hanging out in OTW until I get rid of this stupid l33t ranking.....Crap. That didn't work.
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Aug 01, 2003 9:35 pm    Post subject: Reply with quote

wilburpan wrote:
ebrostig wrote:
I only reboot after adding a new kernel, else the machines are always on.

Your laptop must have one hell of a battery, then. :D


I bet he calls it an AC Adapter. ;-)

Puggy
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Fri Aug 01, 2003 11:02 pm    Post subject: Reply with quote

puggy wrote:
wilburpan wrote:
ebrostig wrote:
I only reboot after adding a new kernel, else the machines are always on.

Your laptop must have one hell of a battery, then. :D


I bet he calls it an AC Adapter. ;-)

Puggy


Don't use laptops :)

Erik
_________________
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Back to top
View user's profile Send private message
Safrax
Guru
Guru


Joined: 23 Apr 2002
Posts: 422

PostPosted: Sat Aug 02, 2003 12:51 am    Post subject: Reply with quote

ebrostig wrote:


Don't use laptops :)

Erik


But think of all the fun and exciting things you can do with a good linux laptop. Kismet powered wardriving, on the road development, uhhh.... and stuff... (lame, I know).

Anyways, we should get this thread back on topic....

Prelinking may help reduce boot time. :D
Back to top
View user's profile Send private message
Loke
Apprentice
Apprentice


Joined: 25 May 2002
Posts: 274
Location: Norway

PostPosted: Sat Aug 02, 2003 8:04 am    Post subject: Reply with quote

I see alot of comments here saying "How can you be bothered with long boot time?" etc. This really makes me wonder: Exactly why is it a good thing if boot time takes a long time? If all of you comment on why one would want shorter boot time, I ask why not if its possible?

I for one wouldnt mind a boot time of 1~2 sec but I see that is unrealistic with the current situation :)
Back to top
View user's profile Send private message
tam
Guru
Guru


Joined: 04 Mar 2003
Posts: 569
Location: freiburg.de

PostPosted: Sat Aug 02, 2003 8:38 am    Post subject: Reply with quote

When I have finished work, I only close the lid of my notebook to suspend. When I open the lid to start it's ready in 2 secs.
Back to top
View user's profile Send private message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Sat Aug 02, 2003 8:49 am    Post subject: well... Reply with quote

i'm hopefull that kernel 2.6 will improve boot times as it increases in version number. Some things can be run in parallel that are not, such as kernel drivers. Most kernel drivers do not have dependancies on other drivers, yet they are loaded in sequence where they could be parallel.

im wondering if it might be faster in some circumstances to load nearly everything as modules and to use an init script instead of modules.autoload to load them in parallel/background.

im building a new "test" system right now and i think ill test this theory out.

I'll need to build a list of things that MUST be compiled in. I dont think an init.ramdisk is a good idea for this so bootime filesystems is a must.

i will give it a shot. see what happens
Back to top
View user's profile Send private message
paulisdead
Guru
Guru


Joined: 10 Apr 2002
Posts: 510
Location: Seattle, WA

PostPosted: Sat Aug 02, 2003 9:13 am    Post subject: Reply with quote

I think this may have been put in the default /etc/conf.d/rc file, but if it's not, add it to the end of it

RC_PARALLEL_STARTUP="yes"

that should make it so init scripts keep loading and don't wait for others unless necassary. One thing that helps for me, is to start the net.eth0 script in the boot runlevel, so I have an IP by the time other scripts like fam and portmap come up, and you don't have to wait.
_________________
"we should make it a law that all geeks have dates" - Linus
Back to top
View user's profile Send private message
Loke
Apprentice
Apprentice


Joined: 25 May 2002
Posts: 274
Location: Norway

PostPosted: Sat Aug 02, 2003 12:46 pm    Post subject: Reply with quote

With
Code:
RC_PARALLEL_STARTUP="yes"
I cant really see any difference in boot speed. However by adding a & on several of my commands in /etc/init.d/ I reduced the boot time with at least a couple of seconds.

Most noticable was the hotplug script, which before took 2-3 sec to start. After adding a &, it does it in the background and I like it better that way.

I think this hacking has potential, so cudos to topic starter! I'll definately look into this.
Back to top
View user's profile Send private message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Sun Aug 03, 2003 5:47 am    Post subject: .. Reply with quote

loke, gimme an example of your "&" placement in the init.d files please..
Back to top
View user's profile Send private message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Sun Aug 03, 2003 5:54 am    Post subject: paulisdead Reply with quote

paulisdead, do you know if add this:

RC_PARALLEL_STARTUP="yes"

will function on all of the init scripts?

im wondering if this will void the usefullness of adding & in the init.d scripts themselves.

im done building the base of my new gentoo system. on Sunday i will do some benchmarking of init script mods and hopefully get some numbers up, then im going to play with some kernel modules and see if i can load most of those in paralell.

im thinking of makeing a modules init.d script for boottime to load everything in parallel, this will give me that ability to have dependancies i think. Im not a guru with init.d scripts so ill need some help their. Im going to run through some of the gentoo docs on the init system.

I'm having some fun with this script, hopefully we can get this somewhere near usefull for the majority of users and get a rc-optimizer script in portage :)

====

anyone know how to get an acurate time from kernel load to prompt without using a stopwatch?
Back to top
View user's profile Send private message
paulisdead
Guru
Guru


Joined: 10 Apr 2002
Posts: 510
Location: Seattle, WA

PostPosted: Sun Aug 03, 2003 8:29 am    Post subject: Reply with quote

It seems to act as if & were placed in the init scripts with that option enabled, at least for me. I'm not too familiar on the exact particulars on how this works, but on my system I can see it skip past services that I know can't startup that quick and say they started OK, but will wait if something requires that service. Shaved off a good few seconds to my boot time. The big thing was using Parrallel startup and moving net.eth0 to the boot runlevel instead of default, this way it can request the IP, keep starting other services, and by the time I'd need net.eth0 to be running for other scripts it'd be ready.

Found this in another thread a couple months back, but can't seem to find it now. Though no in depth explanation was given as to what this option does other than the obvious.
_________________
"we should make it a law that all geeks have dates" - Linus
Back to top
View user's profile Send private message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Tue Aug 05, 2003 3:53 am    Post subject: again.. Reply with quote

again, anyone know how to time bootup accurately instead of just using a stopwatch?
Back to top
View user's profile Send private message
Peaceable Frood
Guru
Guru


Joined: 06 Apr 2003
Posts: 338
Location: New Jersey, USA

PostPosted: Tue Aug 05, 2003 4:04 am    Post subject: Reply with quote

My boot time is pretty quick, about 6 -7 secs with GUI too, I made all my device drivers modules, as well as win file systems, like vfat and ntfs. I had to reboot one day, and I was talking to someone who needed to use windows, they've never used Windows, before. I came back online about 9 secs, and they asked me if I rebooted yet. I'm not loading a whole lot, I haven't gotten grub or samba. I don't imagine it being much slower.
_________________
"Our enemies are innovative and resourceful, and so are we, they never stop thinking about new ways to harm our country and our people, and neither do we." George W. Bush
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
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