View previous topic :: View next topic |
Author |
Message |
slaichus n00b
Joined: 06 Nov 2010 Posts: 1
|
Posted: Sat Nov 06, 2010 5:17 am Post subject: Fast boot? (naive questions from a newbie) |
|
|
Hi!
I want a system that can boot very quickly (<15 sec not on ssd?) and is capable of normal internet browsing (and nothing else). I also have no experience at all with anything beyond Ubuntu
Firstly, is Gentoo the right choice? I tried many ready-for-use allegedly-fast-booting systems (incl. DSL, Puppy, Tiny Core, and others), and they all seem to take at least 30s (except xPUD, which did it in 15, but is unusable). So (correct me if I'm wrong) it seems that I will have to build my own system. Is this the right place?
According to the limited reading around that I did, booting involves slow steps like polling for new hardware, various checks for various things, etc. If we assume that my computer will never change, could all such checks be eliminated by "hard-wiring" the answers during compilation?
Since I won't do anything but internet browsing (turn on, check random fact on wikipedia, turn off), can everything that serves other purposes be cut out?
What else could be done?
If my questions have already been answered somewhere, sorry for repeating - I did search first! |
|
Back to top |
|
|
Muso Veteran
Joined: 22 Oct 2002 Posts: 1052 Location: The Holy city of Honolulu
|
Posted: Sat Nov 06, 2010 5:31 am Post subject: |
|
|
My Phenom ][ box boots in about 15 seconds... but I don't use XDM (or GDM, KDM, Entrance, etc). _________________ "You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop! |
|
Back to top |
|
|
ToeiRei Veteran
Joined: 03 Jan 2005 Posts: 1191 Location: Austria
|
Posted: Sat Nov 06, 2010 2:50 pm Post subject: |
|
|
the problem is not gentoo as such - it's the way you set it up.
Try init-ng or things like that to start services in parallel - gentoo delivers that in portage. _________________ Please stand by - The mailer daemon is busy burning your messages in hell... |
|
Back to top |
|
|
molot Apprentice
Joined: 26 Feb 2005 Posts: 214 Location: Warsaw, Poland
|
Posted: Mon Nov 08, 2010 2:27 pm Post subject: |
|
|
init-ng
minimal installation possible
lightweight window manager
passwordless login
some browser autostarting
That's all you need. To make it even faster, you may boot it only once, then suspend to disk, and then each time just "resume". That's about the way gaming consoles boot. But that's a bit risky on linux pcas our OSes don't support the fact that some of the disk space will stay unchanged and some may change. However, if you'll make the browser only touch data on one (only one writable) partition, setup mounting that partition before browser's start, and unmount it just before hibernating, your boot procedure will go that way:
1) bootloader
2) unpacking ram image from disk to ram (very fast on ssd)
3) mounting partition for changing data
4) starting browser
Can't do faster. 1-3 are doable in less than 5s, tested.
To "shutdown" you need only close the browser, umount data partition and poweroff. _________________ "I just have to run faster than the slowest party member" |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2014
|
Posted: Tue Nov 09, 2010 10:50 am Post subject: Re: Fast boot? (naive questions from a newbie) |
|
|
slaichus wrote: | ...
According to the limited reading around that I did, booting involves slow steps like polling for new hardware, various checks for various things, etc. If we assume that my computer will never change, could all such checks be eliminated by "hard-wiring" the answers during compilation?
... |
Much of the initial startup time goes to the Linux kernel detecting hardware, so if you build a custom kernel with support only for the devices you have, it can cut kernel initialization by, at a guess, about half. You can do this on any Linux distribution, but Gentoo encourages it by not shipping a default kernel, whereas Ubuntu, Red Hat etc. ship a default "everything supported" kernel.
The init system consumes more than half the time at boot. Gentoo offers two, the default "baselayout" version 1 system written in Bash scripts, and "OpenRC", which goes with baselayout 2, and is written in C. It's about twice as quick. Using a custom kernel and OpenRC, my (admittedly powerful) desktop machine boots in about 20 seconds to the KDE logon; before using OpenRC, it took about 50 seconds.
You can get even more by enabling parallel init operation, but I had a problem with that - when it worked it booted in 16 seconds, but about half the time it locked up.
You can cut the time from power off to running even more by enabling hibernation. My netboot starts up in about 11 seconds using this. To enable hibernation, you must allocate a large enough swap partition/file, and select hibernation support in the kernel, pointing at this swap partition. You don't need to install special kernel versions such as Tuxonice if you use KDE - KDE 4 power management includes hibernation support, and does enough for my needs. {EDIT: You need some suspend scripts, specifically the sys-power/hibernate-script package for the "hibernate-cleanup" script.}
The Gentoo Power Management Guide contains more information, but leads, IMHO, to an over-complex setup if you follow all its suggestions. _________________ Greybeard
Last edited by Goverp on Wed Nov 10, 2010 9:07 am; edited 1 time in total |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Tue Nov 09, 2010 12:54 pm Post subject: Re: Fast boot? (naive questions from a newbie) |
|
|
Goverp wrote: | slaichus wrote: | ...
According to the limited reading around that I did, booting involves slow steps like polling for new hardware, various checks for various things, etc. If we assume that my computer will never change, could all such checks be eliminated by "hard-wiring" the answers during compilation?
... |
Much of the initial startup time goes to the Linux kernel detecting hardware, so if you build a custom kernel with support only for the devices you have, it can cut kernel initialization by, at a guess, about half. You can do this on any Linux distribution, but Gentoo encourages it by not shipping a default kernel, whereas Ubuntu, Red Hat etc. ship a default "everything supported" kernel.
The init system consumes more than half the time at boot. Gentoo offers two, the default "baselayout" version 1 system written in Bash scripts, and "OpenRC", which goes with baselayout 2, and is written in C. It's about twice as quick. Using a custom kernel and OpenRC, my (admittedly powerful) desktop machine boots in about 20 seconds to the KDE logon; before using OpenRC, it took about 50 seconds.
You can get even more by enabling parallel init operation, but I had a problem with that - when it worked it booted in 16 seconds, but about half the time it locked up.
You can cut the time from power off to running even more by enabling hibernation. My netboot starts up in about 11 seconds using this. To enable hibernation, you must allocate a large enough swap partition/file, and select hibernation support in the kernel, pointing at this swap partition. You don't need to install special kernel versions such as Tuxonice or the suspend scripts package if you use KDE - KDE 4 power management includes hibernation support, and does enough for my needs.
The Gentoo Power Management Guide contains more information, but leads, IMHO, to an over-complex setup if you follow all its suggestions. |
I am always surprised by one aspect of these (valid in its own sense) discussions - on my computers, already for quite some time, BIOS init sequence takes as much if not longer than subsequent linux init. Especially initilaization of AHCI disks. And this is with baselayout 1, not extensive but healthy set of init services and going to KDM. Aren't we at the point of diminishing return here ? |
|
Back to top |
|
|
molot Apprentice
Joined: 26 Feb 2005 Posts: 214 Location: Warsaw, Poland
|
Posted: Tue Nov 09, 2010 1:09 pm Post subject: Re: Fast boot? (naive questions from a newbie) |
|
|
dmpogo wrote: | Aren't we at the point of diminishing return here ? | Nope, on the netbook / nettop we are not. Those have bioses "cut to size" - when only disk and ram size can change, bios init can be (and in my experience is) almost instant. Like 3s max. The OP asked for an internet browser system, so I guess we are talking about netbook here. _________________ "I just have to run faster than the slowest party member" |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Tue Nov 09, 2010 2:01 pm Post subject: Re: Fast boot? (naive questions from a newbie) |
|
|
molot wrote: | dmpogo wrote: | Aren't we at the point of diminishing return here ? | Nope, on the netbook / nettop we are not. Those have bioses "cut to size" - when only disk and ram size can change, bios init can be (and in my experience is) almost instant. Like 3s max. The OP asked for an internet browser system, so I guess we are talking about netbook here. |
Ok, on my laptop bios is 10-11 sec, and subsequent linux init to KDM is 17 sec. |
|
Back to top |
|
|
molot Apprentice
Joined: 26 Feb 2005 Posts: 214 Location: Warsaw, Poland
|
Posted: Tue Nov 09, 2010 3:00 pm Post subject: Re: Fast boot? (naive questions from a newbie) |
|
|
dmpogo wrote: | Ok, on my laptop bios is 10-11 sec, and subsequent linux init to KDM is 17 sec. | On my Puma platform laptop it's similar case. But I can change cpu, wifi card, hard and optical drive, even bluetooth seems changable, not to say about expansion slot and docking station slot. Bios has to live with that.
My friend's netbook is a closed-case thing. Only thing that may be changed is to add second ram dice. Maybe change hdd, but I'm not sure. That's one or two things to check, when ram check is negible and disk must be of given kind to work anyway.
So I had both of them side by side. With bios fast boot option - small weak netbook started much faster.
Not to mention on netbooks each cycle saved provides much more real time saved due to slower cpu _________________ "I just have to run faster than the slowest party member" |
|
Back to top |
|
|
jimfaster n00b
Joined: 09 Feb 2011 Posts: 5
|
Posted: Tue Sep 27, 2011 6:59 am Post subject: Re: Fast boot? (naive questions from a newbie) |
|
|
Better you go through the reviews of new mac pc launched last month. Its unique & superb than other PCs. It takes less time to boot. (than windows & previous mac pcs) |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Wed Sep 28, 2011 5:04 pm Post subject: |
|
|
My laptop (an elderly T23 with a 5400 rpm drive and 512MB of RAM) takes 30 sec.
from grub prompt to runlevel 3, and a further 7 seconds to a login prompt. From
login to working Gnome desktop takes another 20 seconds. That's with no
modules loaded except for scsi_wait_scan, and no optimisation for boot speed.
I think if you want real speed you're going to need specific hardware, eg. some sort
of netbook, or keep the system hibernated.
Will |
|
Back to top |
|
|
|
|
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
|
|