Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cutting down bootup time (to 5 sec)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Jan 16, 2010 8:46 pm    Post subject: Reply with quote

VinzC wrote:
There are indeed some services that may start after the login process. What if you delay-start lampp from local.start?

belikeyeshua wrote:
What kind of services?

Depends on your installation: mysql, apache, snmpd, all kinds of non-critical daemons...

belikeyeshua wrote:
Also, how can I delay-start lampp?

Start them from /etc/conf.d/local.start with or without a sleep instruction. In the latter case a secondary script would be required I think.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Jan 16, 2010 10:49 pm    Post subject: Reply with quote

http://www.coreboot.org/FAQ

Has anyone tried it? I'd be interested in opinions.
Long thread, sorry if this has been discussed already.
Back to top
View user's profile Send private message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 535

PostPosted: Sun Jan 17, 2010 1:09 am    Post subject: Reply with quote

Jaglover wrote:
http://www.coreboot.org/FAQ

Has anyone tried it? I'd be interested in opinions.
Long thread, sorry if this has been discussed already.

If you're one of the lucky few to have a board that is properly supported, go for it :)
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Jan 17, 2010 1:44 am    Post subject: Reply with quote

From what I read there I understand the board has not to be supported, it's enough if chips on that board are supported. I may give it a try when I find some spare time, I have an Athlon/ASUS box for experimenting.
Back to top
View user's profile Send private message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 535

PostPosted: Sun Jan 17, 2010 2:23 am    Post subject: Reply with quote

It's definitely not that simple. Have a look at the Wiki, you will see that often in detail, many aspects still don't work. Also be careful when flashing Coreboot. If you use a broken build or something else happens during the flash, your board can get bricked.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Tue Jan 19, 2010 7:38 pm    Post subject: Reply with quote

I just took a stop watch to my laptop and did a reboot. When I saw the monitor backlight go on before the BIOS was visible, I started the stop watch. I hit enter as soon as I saw grub and stopped the stop-watch when I saw the login screen. My stop watch read 16.95 seconds. This includes all phases of boot (i.e. BIOS, GRUB, Kernel, Userland and KDM).
Back to top
View user's profile Send private message
albright
Advocate
Advocate


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

PostPosted: Tue Jan 19, 2010 8:55 pm    Post subject: Reply with quote

Quote:
When I saw the monitor backlight go on before the BIOS was visible, I started the stop watch. I hit enter as soon as I saw grub and stopped the stop-watch when I saw the login screen. My stop watch read 16.95 seconds.


Here's mine:

I started my stopwatch when I hit the power switch on.
28.5 seconds to complete KDE desktop (I have auto-login).

My wife's new macbook pro: 15.6 secs from power button to OS X desktop
logged in (again auto-logon).
The macbook also shuts down in 2 seconds!

(Both these notebooks have SSDs - mine is a thinkpad x300)
_________________
.... 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
Twenynge
n00b
n00b


Joined: 08 Jan 2010
Posts: 56

PostPosted: Mon Jan 25, 2010 6:43 am    Post subject: What is Blkid? Reply with quote

I just got around to migrating to OpenRC, Baselayout-2 and Dhcpcd-5 and my boot time got a bit better, but I feel like it still isn't fast enough considering my hardware. Will post a bootchart shortly, but in the meantime, can someone tell me what Blkid is? It seems to be taking up quite a bit of time.

Thanks in advance...
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Wed Jan 27, 2010 9:36 pm    Post subject: Reply with quote

Xytovl wrote:
There are some new things we can try : Ubuntu is aiming at reducing boot time, so they copy patches from moblin. We can probably do the same, here are the patches http://people.canonical.com/~sconklin/mobp/ and this is the thread about it : https://lists.ubuntu.com/archives/ubuntu-x/2009-December/000689.html
The info comes from phoronix, I'll give a try to the patches as soon as I have time.
I was reading about moblin the other day, which is why I ended up reading through this thread. Apparently moblin is using sysvinit, but it is highly customized to provide a boot time down to a couple of seconds. That's pretty impressive considering it takes a generic gentoo setup around 60 seconds to boot on my netbook.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Thu Jan 28, 2010 8:13 am    Post subject: Re: What is Blkid? Reply with quote

Twenynge wrote:
[...] can someone tell me what Blkid is? It seems to be taking up quite a bit of time.

This?
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Thu Jan 28, 2010 3:05 pm    Post subject: Reply with quote

I applied the patches... it did shave a few seconds off my boot. I'm down to 27 instead of 31-33. It seems to be wicd that takes 2-3 secs and then I got sama too. And speaking of Samba... I can't even get the thing to work, yet it adds time to my boot process.

Anyhow, for these patches to cut boot down to 5 secs... I'd say thats not true. It really did not help that much. I wonder if I did anything wrong? I'm using 2.6.32-zen3.
Back to top
View user's profile Send private message
pianosaurus
l33t
l33t


Joined: 19 Apr 2004
Posts: 944
Location: Bash$

PostPosted: Thu Jan 28, 2010 7:08 pm    Post subject: Reply with quote

belikeyeshua wrote:
I applied the patches... it did shave a few seconds off my boot. I'm down to 27 instead of 31-33. It seems to be wicd that takes 2-3 secs and then I got sama too. And speaking of Samba... I can't even get the thing to work, yet it adds time to my boot process.

Anyhow, for these patches to cut boot down to 5 secs... I'd say thats not true. It really did not help that much. I wonder if I did anything wrong? I'm using 2.6.32-zen3.


The patches cuts down the boot time by a certain amount, but not to any specific time. You need to remove everything you don't use in the kernel to get down to 5 seconds. I don't know how much of the gain was in the two patches that don't work any longer. Also, on a default gentoo system the boot process after the kernel takes up a lot more than 5 seconds alone. The patches can't do anything about that.

I'm assuming the 27 seconds you speak of is not in the kernel alone? Cause that would indicate something is wrong.
_________________
PKA Cuber
Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Adopt an unanswered post
Back to top
View user's profile Send private message
tipp98
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2007
Posts: 113

PostPosted: Fri Jan 29, 2010 8:41 am    Post subject: checkfs Reply with quote

My apologies if this has already been discussed, I started reading through the whole thread and then resolved to searching each page with /checkfs.

There are a few scripts that I want to add to a periodic shutdown script, such as disk cleanup, file syncs, and the item that lead me to this thread, disk checks. As I'm sure you have all experienced, this is a long process and can sometimes occur at inopportune times.

I am setting this up but have a few concerns...

1) If I move the script,
I understand that ext3 does not need to be run after an unclean dismount, but are there times when it must be run, such as with forcecheck, and if so, does the checkfs script still need to run to trigger the check, or will it automatically run before being mounted, fail to mount, mount dangerously, etc.?

2) If I copy the script,
If max count triggers during a shutdown, fine, but if it triggers during a reboot, not fine. I don't want the script to run during a reboot, but if it is left in the startup runlevel, it may. Is there a way to read the count so that I may trigger the check prior to reaching max count?

3) Reboot required,
What will happen if a check is performed and a reboot is required? will it automatically reboot instead of finishing the shutdown?

cheers,
Kyle
Back to top
View user's profile Send private message
tipp98
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2007
Posts: 113

PostPosted: Fri Jan 29, 2010 4:00 pm    Post subject: Reply with quote

haha that's funny. After spending a bunch of time figuring this out I decided to upgrade to ~ openrc and psych! there's the option to do just what I was asking about in /etc/conf.d/fsck. However, there is still the vulnerability of running a full disk check on reboot. So, my #2 question still stands.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Thu Feb 04, 2010 12:04 am    Post subject: Reply with quote

I was reading more about moblin today, after trying out their live image (which really does boot quick to a full X11 environment). There is an article here that discusses moblin fastboot technology:
http://moblin.ironhorseinteractive.com/2009/03/moblin-2-alpha%E2%80%99s-fast-boot-amazes/

It is pretty light on details, but one thing that jumped out at my was the fastinit script, which I've never heard of before. I did a little more searching and found this thread on the arch forums:
http://bbs.archlinux.org/viewtopic.php?id=69086

It would be interesting to see if such techniques would work on Gentoo... any voluenteers? :wink:
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Tue Feb 16, 2010 9:46 am    Post subject: Reply with quote

I now have an SSD.
I've done a new amd64 install, with 2.6.33-rc7 and btrfs. I haven't taken the time install bootchart and get exact numbers, but the perceived time grub -> log in -> usable desktop is < 10 seconds.
And that's without any kind of tweaking what so ever, such as openrc.

All of these things are very interesting, and it would be awesome if things started even faster, but an ssd (to no-ones surprise I believe) seems to make the greatest impact.

Edit: Bah, my perception of time sucks :P It was more like 20. Poking around some with openrc, ifplugd and stuff I got to 15.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Thu Feb 18, 2010 10:27 pm    Post subject: Reply with quote

I have something to add to this thread. I noticed that hal has a use flag for crypt, which is used for encrypted file systems. If you do not use an encrypted file system on your computer, you can compile it without crypt support (i.e. echo "sys-apps/hal -crypt" >> /etc/portage/package.use) to remove the need for about a dozen libraries that likely load with hal. I could not detect a significant difference with the change via a stopwatch, but the boot after the kernel handed things over to OpenRC felt faster.

Letharion wrote:
I now have an SSD.
I've done a new amd64 install, with 2.6.33-rc7 and btrfs. I haven't taken the time install bootchart and get exact numbers, but the perceived time grub -> log in -> usable desktop is < 10 seconds.
And that's without any kind of tweaking what so ever, such as openrc.

All of these things are very interesting, and it would be awesome if things started even faster, but an ssd (to no-ones surprise I believe) seems to make the greatest impact.

Edit: Bah, my perception of time sucks :P It was more like 20. Poking around some with openrc, ifplugd and stuff I got to 15.


You could use a stop watch. That is what I did. From turning on the system to going to grub is between 13 and 14 seconds on consecutive runs for me.
Back to top
View user's profile Send private message
andretti
Tux's lil' helper
Tux's lil' helper


Joined: 25 Feb 2007
Posts: 94

PostPosted: Fri Feb 19, 2010 7:33 am    Post subject: Reply with quote

I find customizing rc scripts can make a big difference, as one can code those scripts with prior knowledge about hardware, installed programs and their uses.

I'm also currently in the process of customizing inittab and bypass openrc altogether. My plan is to use kernel's devtmpfs for coldplugs and udev for hotplugs, and start X as soon as possible, and login via screensaver as I'm the only user... (ie. have init script lock the screen immediately after X is started.)

Initial result looks quite promising...
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Sun Feb 28, 2010 10:13 am    Post subject: Reply with quote

andretti wrote:
I find customizing rc scripts can make a big difference, as one can code those scripts with prior knowledge about hardware, installed programs and their uses.

I'm also currently in the process of customizing inittab and bypass openrc altogether. My plan is to use kernel's devtmpfs for coldplugs and udev for hotplugs, and start X as soon as possible, and login via screensaver as I'm the only user... (ie. have init script lock the screen immediately after X is started.)

Initial result looks quite promising...

That sounds _very_ interesting. Could you elaborate on how you do that? Links to more information?

I did use a stopwatch, and with an SSD drive, I'm at kdm in 7 sec.
If I enable the framebuffer to get some resolution between grub and X, the time increases to 9 sec, quite a few % for something I will probably never use.
Back to top
View user's profile Send private message
andretti
Tux's lil' helper
Tux's lil' helper


Joined: 25 Feb 2007
Posts: 94

PostPosted: Sun Mar 14, 2010 12:40 am    Post subject: Reply with quote

Letharion wrote:
That sounds _very_ interesting. Could you elaborate on how you do that? Links to more information?

I did use a stopwatch, and with an SSD drive, I'm at kdm in 7 sec.
If I enable the framebuffer to get some resolution between grub and X, the time increases to 9 sec, quite a few % for something I will probably never use.


I don't have SSD drive, but managed to get it down to 9 secs.

http://hfr-rehost.net/fullsize/http://self/pic/762be82bd97dfa5ffaa272c1cbeccf3ae0e97b86.png

Here's a summary of what I did:

udev front
(1) Skip /sbin/udevadm trigger, as kernel's devtmpfs already have all devices populated.
(2) Remove most default udev rules, and change their focus to primarily permission setting. (I still need udevd hotplug to plug-and-dial my modem)

rc front
(1) Replace /sbin/rc with my own scripts sysinit.sh, boot.sh and default.sh in /etc/inittab.
(2) sysinit.sh starts /sbin/udevd.
(3) boot.sh does md's assemble, all mount's, sysctl, lo, eth0, swaps, alsactl, and chmod & chgrp for video & sound in /dev.
(4) default.sh starts X and all other daemons: syslog-ng, pppd (my internet), fcron, rpcbind etc (NFS stuffs), and other stuffs like dnscache, squid and ntpd.

X front
(1) In default.sh, I drop root to USER and start X with exec /bin/su -l -c '. /etc/profile; exec /usr/bin/xinit' USER &
(2) ~/.xinitrc then starts xscreensaver and fluxbox
(3) Run xscreensaver-command -lock when fluxbox set wall paper (session.screen0.rootCommand I believe...)
(4) Now I - the only user - can "login" or unlock, if I'm around watching it boots...
(5) ~/.fluxbox/apps continues starting other misc GUI apps in background regardless whether I've login (unlock) or not. (bootchartd stopped here - first apps startup item)

Shutdown / Reboot
(1) Replace /sbin/rc shutdown with halt.sh in /etc/inittab
(2) halt.sh /usr/bin/killall -u USERS, /bin/kill all daemons (except syslog-ng, so that it can log until the last moment...), /sbin/killall5 all remaining, umount, swapoff
(3) Continue shutdown or reboot in /etc/inittab with /sbin/halt or /sbin/reboot

Note. I originally planned to use /etc/inittab to control all daemons with lines like

Code:
slog:2345:respawn:/usr/sbin/syslog-ng -F


and have init sends SIGTERM to all daemons when switching to runlevel 0 or 6

but I changed to simpler default.sh approach later, because I would like to know why a daemon died before restarting most of the time...
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: Sun Mar 14, 2010 10:09 am    Post subject: Reply with quote

This is impressive !
I see you can improve the kernel boot time, on my eeePC init starts at about 1.5s.
It is almost all we can compare as my boot is CPU boundand I don't want to lose features that I have in gnome, networkmanager and such heavy programs.
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: Tue Apr 13, 2010 4:52 pm    Post subject: Reply with quote

I have seen that during init, hwclock may take some time, almost half a second on my eeePC. In the kernel there is an option under rtc to set time during boot, making hwclock useless, I have added a "return 0" at the beginning of hwclock and nothing is changed.
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Thu May 06, 2010 7:31 am    Post subject: Reply with quote

I note that there is an accepted GSoC project "Decreasing Gentoo boot time using Upstart"

http://socghop.appspot.com/gsoc/student_project/show/google/gsoc2010/gentoo/t127230759529
Back to top
View user's profile Send private message
Jim6
Tux's lil' helper
Tux's lil' helper


Joined: 08 Apr 2005
Posts: 102

PostPosted: Wed Aug 04, 2010 1:46 pm    Post subject: Reply with quote

Letharion wrote:
I note that there is an accepted GSoC project "Decreasing Gentoo boot time using Upstart"

http://socghop.appspot.com/gsoc/student_project/show/google/gsoc2010/gentoo/t127230759529


I've seen no sign of it on the Gentoo blog feed aggregator ...
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Wed Aug 04, 2010 3:48 pm    Post subject: Reply with quote

albright wrote:
[
Here's mine:

I started my stopwatch when I hit the power switch on.
28.5 seconds to complete KDE desktop (I have auto-login).

My wife's new macbook pro: 15.6 secs from power button to OS X desktop
logged in (again auto-logon).


Besides other things, Apple writes their own BIOS, it is not some generic one as on PC's

Speaking about BIOS - for me POST to GRUB takes almost as much time as GRUB to login, so it seems that further efforts speeding
up linux part is a game of diminishing return.

At BIOS stage long time is taken by probing hard drives with AHCI driver. Remarkably, on a relatively new x58 motherboard (model is year old),
AHCI driver still has copyright 2006, seems same version my 2007 motherboard had.
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 Previous  1, 2, 3, 4, 5, 6, 7
Page 7 of 7

 
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