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  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Mon Mar 16, 2009 2:09 pm    Post subject: Reply with quote

I did not do too much with openrc yet... working on it though.

What puzzles me is, I'm supposed to copy /etc/conf.d/rc over to /etc/rc.conf and then delete /etc/conf.d/rc.....right???

Sounds dangerous, I just hope I did not read it wrong. I think I will back up the files first so I can at least bring it back to normal if needed.

~Shawn
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Mon Mar 16, 2009 2:39 pm    Post subject: Reply with quote

belikeyeshua wrote:
I did not do too much with openrc yet... working on it though.

What puzzles me is, I'm supposed to copy /etc/conf.d/rc over to /etc/rc.conf and then delete /etc/conf.d/rc.....right???

Sounds dangerous, I just hope I did not read it wrong. I think I will back up the files first so I can at least bring it back to normal if needed.

~Shawn


AFAIK there's no need to delete the file. While you should follow the guide, I think I installed openrc, manually "moved" any settings I wanted, renamed the old file while testing a reboot,
and only then deleted it. And as you say, backups is always a good idea.
Back to top
View user's profile Send private message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Mon Mar 16, 2009 3:27 pm    Post subject: Reply with quote

I'm stuck.

I guess I do not need to install Openrc...right? Just do a update?

Anyhow, I get stuck here:

Quote:


Code Listing 2.5: Adding missing volume management services to the boot runlevel

# rc-update add root boot
# rc-update add procfs boot
# rc-update add mtab boot
# rc-update add fsck boot
# rc-update add swap boot


I get this:

Quote:
atlantis shawn # rc-update add mtab boot
* rc-update: '/etc/init.d/mtab' not found; aborting
atlantis shawn # rc-update add fsck boot
* rc-update: '/etc/init.d/fsck' not found; aborting
atlantis shawn # rc-update add swap boot
* rc-update: '/etc/init.d/swap' not found; aborting



Also, if you are supposed to install openRC, it says that the packages are blocked.
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Mon Mar 16, 2009 3:30 pm    Post subject: Reply with quote

Well, you WILL only need an update, when OpenRC is stable.
Currently, you'll need this:

Code:
#OpenRC and friends
sys-apps/baselayout
sys-apps/openrc
sys-fs/udev
sys-apps/sysvinit
sys-apps/hal
sys-fs/cryptsetup


In your keywords.
Back to top
View user's profile Send private message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Mon Mar 16, 2009 3:53 pm    Post subject: Reply with quote

Well well, I think I blew it or something or the other... Here is a link that explains my problem.

https://forums.gentoo.org/viewtopic-p-5567111.html#5567111
.
I cannot install any of the Openrc packages because a lot of things are blocked, and now I do not even have a bootable system. :(
Back to top
View user's profile Send private message
onefriedrice
n00b
n00b


Joined: 26 Aug 2007
Posts: 57

PostPosted: Tue Mar 17, 2009 12:19 am    Post subject: Reply with quote

belikeyeshua wrote:
I also would like to make Gentoo boot up a little faster. I did add the preload thing...


Just a quick clarification in case my explanations were misleading: preload will not decrease your boot time, but it should improve application start time.
Your mileage may vary.
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: Tue Mar 17, 2009 8:09 am    Post subject: Reply with quote

belikeyeshua wrote:
Well well, I think I blew it or something or the other... Here is a link that explains my problem.

https://forums.gentoo.org/viewtopic-p-5567111.html#5567111 .
I cannot install any of the Openrc packages because a lot of things are blocked, and now I do not even have a bootable system. :(

You also have OpenRC support thread for these kinds of issues.
_________________
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: Tue Mar 17, 2009 9:18 am    Post subject: Reply with quote

The gentoo gus were a big help to me... I fixed it. Now I am having some other problems (internet not working, wrong resolution, etc) but its nothing I can not fix.
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: Sun Mar 22, 2009 11:07 am    Post subject: Reply with quote

Already, without doing much but enable VIRTIOXXX stuff in a KVM guest, I could boot a Gentoo virtual machine in less than 15 seconds with only one virtual CPU 8O ! It's a Gentoo base system (No X) plus nfs, openldap server, kerberos server and Quingy. All three start at boot. OpenRC 0.4.3 is installed and runs in parallel mode.

All in all, I have a working framebuffer console ready for input in approx. 12 seconds (from pressing enter at the boot loader until the console login accepts input). Host is a Dell Inspiron 9400, Core2 Duo 1.8GHz with VMX enabled and is running the x86_64 branch of 2.6.28-gentoo-r4. KVM is version 79-r1 and uses kernel built-in kvm modules. Guest is a Gentoo Linux i686 2.6.27-gentoo-r8 SMP kernel with VIRTIO enabled:
Code:
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_VIRTIO=y
CONFIG_VIRTIO_RING=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BALLOON=y

Da race is open ;) .
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Fri Mar 27, 2009 6:41 am    Post subject: Reply with quote

I just wanted to say. "IT'S ON!" ;)
But I'm stuck at booting up the 64bit install cd :(
Now i see however that I've misread your post. Your host is 64, and not the guest, so maybe I won't bother with it. I mainly wanted to match your VM closely.

Could you explain a bit about the virtio stuff, I'm unfamiliar with it... Does it improve my performance? Googling it reveals quickly that it's related to the virtualization, but my impression is that they are supposed to be in the host, not the guest? Or both?

Ok, here's what we've got:
Times are from grub "enter" to login:
Fresh install with RC_PARALLEL_STARTUP: 17sec
OpenRC with dhcpcd-4.99: 15sec
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: Fri Mar 27, 2009 11:45 pm    Post subject: Reply with quote

As far as I understood, VIRTIO features allow for a modified kernel so that it's aware of being virtualized. As you might know KVM is a full virtualization platform. While code runs natively on the host CPU, I/O consume a lot of processing resources, unless the guest kernel can be modified, which is called paravirtualization. VIRTIO enable paravirtualization on the guest side, reducing the I/O overhead. That brings a significant increase in speed.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Sat Mar 28, 2009 4:01 pm    Post subject: Reply with quote

Ok. My first impression was that it was on the host side of things that virtio somehow unified the IO interface the different VMs used. I'm gonna have to read more on what can be done in that area.

Meanwhile:
1) Upgraded gcc to 4.3.3, and glibc to 2.9.
2) Set march=native, and rebuilt my system
3) Cleaned out lots of crap from the kernel that wasn't needed (Now sized 1.6M)
Boottime: 9 seconds. :D

I'm guessing number 3 is what made the difference, but any more insight as to what might have helped, please go ahead.
Back to top
View user's profile Send private message
stable.entropy
n00b
n00b


Joined: 27 Mar 2008
Posts: 11

PostPosted: Sat Mar 28, 2009 6:34 pm    Post subject: Reply with quote

I had a full loaded machine (boot+X+wireless networking+WM) in seven seconds. If I didn't load X and everything before it, it averaged four seconds. This involved no crazy hacks either. The following bootchart was before the newest modifications I made.

75 seconds became: this
Which became: this
_________________
The Prophecies of Entropy


Last edited by stable.entropy on Sat Mar 28, 2009 6:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Sat Mar 28, 2009 6:40 pm    Post subject: Reply with quote

Nice :)

Einit eh?
Might be worth looking into.
You seem to have VERY few things starting up, you you say you have both a window manager and wireless up. Interesting :)


Last edited by Letharion on Sat Mar 28, 2009 6:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
stable.entropy
n00b
n00b


Joined: 27 Mar 2008
Posts: 11

PostPosted: Sat Mar 28, 2009 6:52 pm    Post subject: Reply with quote

Letharion wrote:
Nice :)

Einit eh?
Might be worth looking into.
You seem to have VERY few things starting up, you you say you have both a window manager and wireless up. Interesting :)


I don't have a bootchart for my current desktop.

Secondly, the software the desktop uses is current going through some major changes and the current versions DO NOT WORK. (Hence, don't attempt it. I am not responsible if someone decides to break their system.) I posted those to show that eInit worked perfectly when I used it. However, for internal reasons it was decided a rewrite was in order, and that is what has been going on over the past few months.
_________________
The Prophecies of Entropy
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Sat Mar 28, 2009 6:57 pm    Post subject: Reply with quote

What does einit/kyuba do that's so much faster than other systems? Like OpenRC?
Back to top
View user's profile Send private message
stable.entropy
n00b
n00b


Joined: 27 Mar 2008
Posts: 11

PostPosted: Sat Mar 28, 2009 7:23 pm    Post subject: Reply with quote

Letharion wrote:
What does einit/kyuba do that's so much faster than other systems? Like OpenRC?


OpenRC allows an init system to use the /etc/init.d/ scripts. It's basically a wrapper for adding/removing services from that scheme.
It's mainly used with Sysvinit.

eInit was an IPC and event-driven service manager that had it's own set of init 'modules' which were loaded into the program and handled various services in a completely different manner. It was designed to remove bash/sh shell scripting as much as possible which led to some significant speed increases.

Kyuba is a set of daemons like eInit, but purified. It has an s-expression based configuration file, which is a massive improvement over the XML used in eInit. Right now it doesn't support anything more than a simple inittab-style approach to booting, but once the core system is stabilized, this will change.
_________________
The Prophecies of Entropy
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Sat Mar 28, 2009 8:26 pm    Post subject: Reply with quote

stable.entropy wrote:
I had a full loaded machine (boot+X+wireless networking+WM) in seven seconds. If I didn't load X and everything before it, it averaged four seconds. This involved no crazy hacks either. The following bootchart was before the newest modifications I made.

75 seconds became: this
Which became: this


If you wanna try to cut that down further 2.6.29 has a fastboot option.

It's off by default, and could cause problems, fastboot kernel parameter should do it.
Back to top
View user's profile Send private message
stable.entropy
n00b
n00b


Joined: 27 Mar 2008
Posts: 11

PostPosted: Sat Mar 28, 2009 9:20 pm    Post subject: Reply with quote

neuron wrote:
stable.entropy wrote:
I had a full loaded machine (boot+X+wireless networking+WM) in seven seconds. If I didn't load X and everything before it, it averaged four seconds. This involved no crazy hacks either. The following bootchart was before the newest modifications I made.

75 seconds became: this
Which became: this


If you wanna try to cut that down further 2.6.29 has a fastboot option.

It's off by default, and could cause problems, fastboot kernel parameter should do it.

_________________
The Prophecies of Entropy
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Sat Mar 28, 2009 11:48 pm    Post subject: Reply with quote

Quote:
If you wanna try to cut that down further 2.6.29 has a fastboot option.

It's off by default, and could cause problems, fastboot kernel parameter should do it.


Oh, it does? I've been waiting for that :D I thought it was supposed to be in 28, but I haven't checked out 29 yet. I will try it out asap :)

stable.entropy: It might be interesting for you too. It does hardware initialization asynchronously. Gets to init faster :)
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Sun Mar 29, 2009 4:38 pm    Post subject: Reply with quote

Letharion wrote:
Quote:
If you wanna try to cut that down further 2.6.29 has a fastboot option.

It's off by default, and could cause problems, fastboot kernel parameter should do it.


Oh, it does? I've been waiting for that :D I thought it was supposed to be in 28, but I haven't checked out 29 yet. I will try it out asap :)

stable.entropy: It might be interesting for you too. It does hardware initialization asynchronously. Gets to init faster :)


Bah, appears I'm still w8ing:
"In the end, the code remains in place, but it is not activated in the absence of the new fastboot kernel parameter. So adventurous developers can give asynchronous function calls a try; the rest of us can wait for this feature to cook just a little longer."
Doesn't appear to be ready yet.
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Sun Mar 29, 2009 9:03 pm    Post subject: Reply with quote

Interesting stuff that isn't ready yet, that I'd like to try in the future:

2.6.30 might have stable fastboot support
Sreadahead. Doesn't install in portage today because of missing keyword, and Mr. Tso appears to be too busy with other stuff.
Kyuba. No idea when it's meant to be ready for general use.
Xorg-1.6. It's my understanding that Xorg is moving more and more hardware detection to the kernel, which should mean it's already done when X starts. Hopefully this gives a WM faster in the future.
Back to top
View user's profile Send private message
jago25_98
Apprentice
Apprentice


Joined: 23 Aug 2002
Posts: 180

PostPosted: Sat Apr 18, 2009 7:02 am    Post subject: Reply with quote

As a completely different way of looking at it, what about booting a separate linux altogether and chroot to Gentoo when you need to:

http://www.xpud.org

Seems to be quicker than resume from disk?

I'm going to do this first myself because it's easy and all I mostly use is Firefox. Would work well with flash drives but you're stuck with that kernel until reboot.


Another idea that I haven't seen mentioned (perhaps I missed it?) is loading up the bare minimum to get X working (and perhaps Firefox too), and then load extra stuff in the background when system load is low (computer not in use).
Back to top
View user's profile Send private message
eitan1989
n00b
n00b


Joined: 03 Mar 2004
Posts: 48
Location: USA

PostPosted: Wed May 20, 2009 3:42 pm    Post subject: Reply with quote

BrummieJim wrote:
My main problems with booting can be traced to dhcpcd, in that it runs twice and still goes to time-out even if there's not a cable plugged in (sky2 driver). I'm running at about 45 seconds on a laptop.
I'm going to look thorough the kernel, but with things like the agn4965 wireless and a nvidia card, this becomes difficult.

dhcpcd-5 isn't in portage, any advice?
Any suggestions,
Jim


Sorry if I'm stating the obvious and this won't work for you for some reason, but I puttered around for ages before I noticed ifplugd. All you have to do is emerge ifplugd and add it to modules_[iface] to /etc/conf.d/net for the appropriate interface(s) (or the universal modules var whatever it's called - I use wpa_supplicant for wireless which makes it unncessary). It takes care of starting and stopping based on whether a cable is plugged in and backgrounds immediately to keep your boot quick.
Back to top
View user's profile Send private message
yrral
n00b
n00b


Joined: 22 May 2009
Posts: 6

PostPosted: Fri May 22, 2009 4:19 am    Post subject: Reply with quote

I'm joining the party. I currently have a laptop with an ssd and my current boot time is around 11 seconds with x and everything. Any other suggestions to make it faster?
http://img507.imageshack.us/img507/8521/bootchart.png
I have the 29 kernel and openrc. Will migrating to an init alternative take many seconds off boot?
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  Next
Page 3 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