Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Speed up boot!
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
xkjyeah
n00b
n00b


Joined: 10 May 2003
Posts: 72

PostPosted: Mon Feb 02, 2004 4:49 am    Post subject: Speed up boot! Reply with quote

I shut down my computer often (and don't discourage me on that). Give me ideas on how to boot Gentoo as fast as possible.

My own suggestions:

- Loading modules seem quite long. I think it is because of "modules-update" and awking the whole modules file. If we cached results of the awk, and skipped modules-update, it should be faster (haven't tried).

However, without modules-update, forgetful people (like me) will forget to do so. But it wouldn't be required often, am I right?

- DHCP requests can take a few seconds, especially with certain NICs --> ifplugd.

- ALSA -- see modules.

- Tried hotplug b4, but not now. "/sbin/hotplug &" (see my comment below)?


Lastly, is it possible to offload Scanning of font directories (for XFS), modules-update (which would ideally cache ALSA and modules.autoload) to runtime? Perhaps in cron? The slow startup can also be attributed to all the BASH activities (source -ing). Anything to speed that up?

----------------------------

WinXP boots 1.5 times as fast as by Gentoo, the main reason for this post. I do not want to cheat by making bash "fork" using "&". I want the error messages, if any.
Back to top
View user's profile Send private message
paulisdead
Guru
Guru


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

PostPosted: Mon Feb 02, 2004 5:02 am    Post subject: Reply with quote

Make sure you've got this line in /etc/conf.d/rc

Code:
RC_PARALLEL_STARTUP="yes"


This allows multiple services to startup simaltaneously, instead of waiting for each one to start one after another, though some services are dependant on others, and still have to wait for their dependant services to start. This helps in most services by a barely noticeable difference, but really helps with DHCP. I even moved net.eth0 from default to the boot runlevel, so it's finished starting by the time any other services need it.
_________________
"we should make it a law that all geeks have dates" - Linus
Back to top
View user's profile Send private message
ett_gramse_nap
Apprentice
Apprentice


Joined: 01 Oct 2003
Posts: 252
Location: Göteborg, Sweden

PostPosted: Mon Feb 02, 2004 6:18 am    Post subject: Reply with quote

What are the differences between 'boot' and 'default'? Are 'boot' just earlier?
_________________
Don't bother!
Back to top
View user's profile Send private message
Evil Dark Archon
Guru
Guru


Joined: 21 Dec 2002
Posts: 562
Location: Santa Rosa, CA

PostPosted: Mon Feb 02, 2004 6:27 am    Post subject: Reply with quote

in a word, yes, the boot also gets special treatment by rc-update, basically it will warn you before removing anything from the boot runlevel.
_________________
This post has been over explained for newb-informing purposes.

Registered Linux user 347334
Abit AV8-3rd eye, AMD Athlon64 3500+ 90nm, ATI Radeon x850 pro
Back to top
View user's profile Send private message
ett_gramse_nap
Apprentice
Apprentice


Joined: 01 Oct 2003
Posts: 252
Location: Göteborg, Sweden

PostPosted: Mon Feb 02, 2004 9:07 am    Post subject: Reply with quote

Evil Dark Archon wrote:
in a word, yes, the boot also gets special treatment by rc-update, basically it will warn you before removing anything from the boot runlevel.


Is there any rules/suggestions in which runlevel certain services should run? I've encountered tutorials and howto's that differs in their rc-update recommendations... For example the shorewall firewall initialization.
_________________
Don't bother!
Back to top
View user's profile Send private message
grzewho
l33t
l33t


Joined: 31 Dec 2002
Posts: 626
Location: /home/g

PostPosted: Mon Feb 02, 2004 9:22 am    Post subject: Reply with quote

I`ve commented out the modules-update line in /etc/init.d/modules, and run it manually when I upgrade my kernel or change something with my modules config. Don`t know if its a proper fix, but it speeds up my boot.
Code:

#ebegin "Calculating module dependencies"
#/sbin/modules-update &>/dev/null
#eend $? "Failed to calculate dependencies"

_________________
Code:
USE="freedom -software_patents" emerge --deep --update world
Back to top
View user's profile Send private message
ett_gramse_nap
Apprentice
Apprentice


Joined: 01 Oct 2003
Posts: 252
Location: Göteborg, Sweden

PostPosted: Mon Feb 02, 2004 7:13 pm    Post subject: Reply with quote

grzewho wrote:
I`ve commented out the modules-update line in /etc/init.d/modules, and run it manually when I upgrade my kernel or change something with my modules config. Don`t know if its a proper fix, but it speeds up my boot.
Code:

#ebegin "Calculating module dependencies"
#/sbin/modules-update &>/dev/null
#eend $? "Failed to calculate dependencies"



Are you saying that this one is needed at every boot? Wow! "Calculating module dependencies" takes like forever on my computer...
_________________
Don't bother!
Back to top
View user's profile Send private message
grzewho
l33t
l33t


Joined: 31 Dec 2002
Posts: 626
Location: /home/g

PostPosted: Tue Feb 03, 2004 12:50 pm    Post subject: Reply with quote

as I wrote above, I run modules-update only when upgrading the kernel or modifying modules configuration. I don`t see the point to run it every boot
_________________
Code:
USE="freedom -software_patents" emerge --deep --update world
Back to top
View user's profile Send private message
Spawn of Lovechild
Apprentice
Apprentice


Joined: 03 Feb 2004
Posts: 253
Location: Århus, Denmark

PostPosted: Tue Feb 03, 2004 1:07 pm    Post subject: Reply with quote

Robert M. Love's blog (http://primates.ximian.com/~rml/blog/) included the following snippet yesterday.

Quote:

Working on some code to preload X/GNOME startup-related data into memory during boot. Booting on a Linux machine takes longer than with XP, and that just plain sucks. The preloading I am working on should prevent the pathological seeky read of many smalls files that occurs during desktop bring up, by doing that I/O in the background, earlier, and not serializing everything into I/O wait hell.


Someone might find that interesting in terms of getting a usable machine up sooner rather than later. I'm sure the technic can be used for KDE as well with some adaptions (for those who prefer that).
_________________
Proud to be a 22 year old Infidel, GNOME lover and member of LIK.
Back to top
View user's profile Send private message
markfl
Apprentice
Apprentice


Joined: 10 Apr 2003
Posts: 240
Location: Kent, UK

PostPosted: Tue Feb 03, 2004 1:33 pm    Post subject: Reply with quote

Linux boots damn fast on my machine, i havent timed it but i can boot an unoptimised XP in 20 seconds
I'm gonna try a couple of the tweaks here when i get home
markfl
_________________
Life it seems, will fade away
Drifting further every day
Back to top
View user's profile Send private message
xkjyeah
n00b
n00b


Joined: 10 May 2003
Posts: 72

PostPosted: Mon Feb 09, 2004 8:51 am    Post subject: Reply with quote

The boot time sux. Everytime I want to boot the computer to surf the net, I have to decide between 10+seconds of waiting (WinXP) and 30+seconds (you-know-what).

And last of all, KDE takes quite some time to start (from login screen to 100%), haven't timed, but
definitely around 5 seconds slower.

Is is because the structure of the Gentoo booting system is just plain slow? It is like bash, bash and more bash, init scripts under runscripts.sh under bash and more bash??!!
Back to top
View user's profile Send private message
zerojay
Veteran
Veteran


Joined: 09 Aug 2003
Posts: 1033

PostPosted: Mon Feb 09, 2004 9:10 am    Post subject: Reply with quote

Honestly, is your time so precious that you can't handle waiting 30 seconds to boot up a machine?
Back to top
View user's profile Send private message
neenee
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1786

PostPosted: Mon Feb 09, 2004 9:14 am    Post subject: Reply with quote

for laptops and finishing something quickly,
30 seconds is a quite long wait.
Back to top
View user's profile Send private message
sebest
Apprentice
Apprentice


Joined: 03 Jul 2002
Posts: 163
Location: Paris - France

PostPosted: Mon Feb 09, 2004 3:38 pm    Post subject: Reply with quote

xkjyeah wrote:
The boot time sux. Everytime I want to boot the computer to surf the net, I have to decide between 10+seconds of waiting (WinXP) and 30+seconds (you-know-what).

And last of all, KDE takes quite some time to start (from login screen to 100%), haven't timed, but
definitely around 5 seconds slower.

Is is because the structure of the Gentoo booting system is just plain slow? It is like bash, bash and more bash, init scripts under runscripts.sh under bash and more bash??!!


i think the problem is not bash.

Windows xp to give the impression of a quick start, start the equivalent of xdm, before all other services.

so while you log in windows xp, the os is still loading other services, that's why sometimes windows xp is not responsive when you start an application right after login, because this app is waiting for a service not yet loaded.

I heard it's not easy to do the same on linux, because of getty that must be started before xdm.

But in theory we could start xdm, right after network, and then load things like
mail, sshd, apache, ftp, and so on.
_________________
--
Seb aka "Mr Est"
Back to top
View user's profile Send private message
log
Apprentice
Apprentice


Joined: 16 Jun 2003
Posts: 168
Location: Adelaide, Australia

PostPosted: Tue Feb 10, 2004 3:11 am    Post subject: Reply with quote

I used to have an Athlon 1.3Ghz and it booted way quick.

I got rid of that and upgraded to a P4 3Ghz (laptop) and now it takes longer to boot the kernel (nottalking about services yet). The services take about the same amount of time to boot as well.

Ill be upgrading to the 2.6 kernel soon to see if it makes a diff..

cheers
Back to top
View user's profile Send private message
sebest
Apprentice
Apprentice


Joined: 03 Jul 2002
Posts: 163
Location: Paris - France

PostPosted: Tue Feb 10, 2004 10:40 am    Post subject: Reply with quote

Anyway if you want a really fast shutdown and startup you could use suspend to ram.:
http://swsusp.sourceforge.net/

you start exactly where you left. it's the same functionaly as "hibernate" in windows.
_________________
--
Seb aka "Mr Est"
Back to top
View user's profile Send private message
RaaR
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2003
Posts: 125

PostPosted: Tue Feb 10, 2004 3:41 pm    Post subject: Reply with quote

sebest wrote:
Anyway if you want a really fast shutdown and startup you could use suspend to ram.:
http://swsusp.sourceforge.net/

you start exactly where you left. it's the same functionaly as "hibernate" in windows.

Actually, suspend-to-ram exists in windows too. In "hibernate" everything is saved to the hdd whereas in suspend-to-ram everything stays in memory. Suspend-to-ram is newer and faster but not supported by as many motherboards as hibernation.
Back to top
View user's profile Send private message
sebest
Apprentice
Apprentice


Joined: 03 Jul 2002
Posts: 163
Location: Paris - France

PostPosted: Tue Feb 10, 2004 4:05 pm    Post subject: Reply with quote

yes but you can't unplug your computer in suspend to ram,
suspend to swap (or to disk, it's the same) allow you to keep you data when you battery are empty.
_________________
--
Seb aka "Mr Est"
Back to top
View user's profile Send private message
sindre
Guru
Guru


Joined: 01 Nov 2002
Posts: 315
Location: Norway

PostPosted: Tue Feb 10, 2004 7:45 pm    Post subject: Reply with quote

Faster booting isn't gonna hurt anyone (and it looks nice when comparing to other OSes).
Back to top
View user's profile Send private message
Boris27
Guru
Guru


Joined: 05 Nov 2003
Posts: 562
Location: Almelo, The Netherlands

PostPosted: Tue Feb 10, 2004 8:40 pm    Post subject: Reply with quote

log wrote:
I used to have an Athlon 1.3Ghz and it booted way quick.

I got rid of that and upgraded to a P4 3Ghz (laptop) and now it takes longer to boot the kernel (nottalking about services yet). The services take about the same amount of time to boot as well.

Ill be upgrading to the 2.6 kernel soon to see if it makes a diff..

cheers


That's because laptop drives are only 4200 RPM, versus 7200 RPM of desktop drives. The processor does almost nothing while booting. Its all I/O wait.
Back to top
View user's profile Send private message
pranyi
Apprentice
Apprentice


Joined: 06 Mar 2003
Posts: 293
Location: Germany

PostPosted: Wed Feb 11, 2004 12:27 am    Post subject: Reply with quote

A had made some experiment with stopwatch.

I have parallel booting enabled, and eliminated modules-update from my init.d/modules.

Now, my box (Athlon 2000+, with 512 Mb RAM, 7200 RPM HDD), boots for 40 secs: it takes about 25-30 sec until X starts, then about 10 secs until the login window comes. After logging in, I have to wait for about 10 additional secs for KDE to start up. Interestingly, the first 5-7 secs of the booting is spent in checking the BIOS.

Window XP boots in 15 seconds until the login window and after logging in, one can start working almost instanteously.

So booting with WinXP is between 2x-3x faster then with Linux after tweaking...
:(
Back to top
View user's profile Send private message
_Nomad_
Guru
Guru


Joined: 11 Apr 2003
Posts: 571

PostPosted: Wed Feb 11, 2004 12:34 am    Post subject: Reply with quote

pranyi wrote:
So booting with WinXP is between 2x-3x faster then with Linux after tweaking...
:(


I don't know about you guys but I think that is easily compensated by the fact that you don't have to reboot every six hours just to free up memory... And I always use the software suspend on my laptop... doesn't take more than 15 -20 secs to boot...
Back to top
View user's profile Send private message
pranyi
Apprentice
Apprentice


Joined: 06 Mar 2003
Posts: 293
Location: Germany

PostPosted: Wed Feb 11, 2004 12:41 am    Post subject: Reply with quote

_Nomad_ wrote:
I think that is easily compensated by the fact that you don't have to reboot every six hours just to free up memory...


I don't know about that, however I almost never use XP. Still it shows. that there is potential for speeding things up. It also shows, that most time is spent in the real booting, not in setting up KDE, etc.

However, it would be interesting, if X would start up while connecting to net, starting up sshd,postgres, etc. I think it could help gaining some "precious" seconds... ;)
Back to top
View user's profile Send private message
int2str
Guru
Guru


Joined: 29 Sep 2003
Posts: 362

PostPosted: Wed Feb 11, 2004 12:48 am    Post subject: Reply with quote

FWIW, my Athlon 2400+ on my laptop boots about like this:

- 5-6 seconds to grub (compaq screen...)
- ~30 seconds kernel+init (Without X, I would be able to login at this point)
- ~20 seconds for X+kdm to load
- ~25 seconds after login, KDE is 100% done and ready

So it takes me about 1min 20secs to boot and log in.

And no SWSUSP completely doesn't work on my machine...

I'm pretty sad about this actually.

Can't compare to XP since I dont dual boot.
_________________
Adpot an unanswered post today!
Back to top
View user's profile Send private message
gmichels
Guru
Guru


Joined: 20 Jun 2003
Posts: 480
Location: Brazil

PostPosted: Wed Feb 11, 2004 1:18 pm    Post subject: Reply with quote

int2str wrote:
FWIW, my Athlon 2400+ on my laptop boots about like this:

- 5-6 seconds to grub (compaq screen...)
- ~30 seconds kernel+init (Without X, I would be able to login at this point)
- ~20 seconds for X+kdm to load
- ~25 seconds after login, KDE is 100% done and ready

So it takes me about 1min 20secs to boot and log in.

And no SWSUSP completely doesn't work on my machine...

I'm pretty sad about this actually.

Can't compare to XP since I dont dual boot.


I have the same scenario. A friend of mine has the same laptop model as I and he runs windows xp. I can tell xp takes a long time to boot (about 45s) due to the 4200 rpm hdd, but not as much as mine until kde finishes starting up.

If sw suspend worked, I would gladly use it.

I also have a desktop machine which I dual boot. Windows XP takes no more than 10s to show up the login screen, while KDE will take more than 20s to start initializing.
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, 4, 5, 6  Next
Page 1 of 6

 
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