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

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Fri Jul 04, 2014 7:41 pm    Post subject: Speed up Boot Reply with quote

I know there have been a few of these topics, but I'd like to speed up my Gentoo boot. I'm just not sure what to do with it next. I've got from BIOS to the KDE desktop (pausing the stop watch when I type my password) down to ~1 minute (was ~1:10). I could probably recompile my kernel with more stuff pulled out, and I'll look into doing that at somepoint, but there should be other things that can be done. I'd like to trim it down to ~40 seconds if possible (it's a Dell Latitude D620, so not the fastest one around). I use OpenRC, as from what someone with a similar network card as me has said, systemd doesn't cooperate well with the wireless (Intel pro wireless 3945ABG). If I can start xorg a little sooner that'd probably help a little, it's always the last to load. I enabled parallel loading in /etc/rc.conf but it didn't seem to save even a full second.

Here is a link to my Bootchart
https://www.dropbox.com/s/hjowsfku9n4vbzu/bootchart.png
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Jul 04, 2014 8:38 pm    Post subject: Reply with quote

lcronos ...

Before offering any advice I'd have to ask: what do you plan on doing with the extra seconds? While improving on a one minute boot is achievable I think the fact that it boots correctly is probably of more importance. If its a question of getting to work as soon as possible then hibernation is probably a better option (as then the entire working environment is as you'd left it).

Anyhow, one of the suggestion I would make is changing the default 'posix shell', bash is used by default as its linked to /bin/sh ... using /bin/dash or /bin/mksh (or busybox ... though I had a lot more issue with initscripts when last booting with this) as /bin/sh will improve the speed at which the initscripts are executed.

Code:
# emerge --ask app-admin/eselect-sh app-shells/dash
# eselect sh list
# eselect sh set {n}

If you're using ext4 you might look at sys-fs/e4rat (website) ... not used it myself but the claim is that it will improve boot time by ordering the files accessed at boot.

Again, you may want to look at using TuxOnIce ... a hibernation for me takes about 2 or 3 seconds (not including the time it takes to provide the password to the luks volume containing the lvm-swap where the hibernation image is stored).

best ... khay
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Fri Jul 04, 2014 9:38 pm    Post subject: Reply with quote

I use the laptop for school, and it helps to have a set up that boots quickly. I'm working on making use of hibernate, I've just always used shutdown so it's a matter of breaking old habits lol.

The majority of my time seems to come from loading KDE, which is kind of annoying since I've pulled out almost all services that start at login. If you know of any tricks to make KDE start faster, it'd be appreciated.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Jul 04, 2014 10:00 pm    Post subject: Reply with quote

lcronos wrote:
I use the laptop for school, and it helps to have a set up that boots quickly. I'm working on making use of hibernate, I've just always used shutdown so it's a matter of breaking old habits lol.

lcronos ... indeed. Hibernate *may* be a little more difficult to setup, dependent on which option you go for, the in kernel uswsusp, or suspend2, aka, TuxOnIce. The latter will require the kernel to be patched (or the use of sys-kernel/tuxonice-sources) ... I'd recommend tuxonice, its far more reliable and flexable.

lcronos wrote:
The majority of my time seems to come from loading KDE, which is kind of annoying since I've pulled out almost all services that start at login. If you know of any tricks to make KDE start faster, it'd be appreciated.

Other than the above e4rat no, but then I'm not using a DE so perhaps others may have suggestions I'm unaware of.

best ... khay
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Fri Jul 04, 2014 10:49 pm    Post subject: Reply with quote

Ended up using tuxonice, it's not bad. Definitely a lot faster, I just wish it made me log back in still. e4rat seems to be working pretty well, thanks for the help. Maybe some KDE users can chip in now for some advice on loading it quickly.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat Jul 05, 2014 1:03 am    Post subject: Reply with quote

lcronos wrote:
[...] I just wish it made me log back in still.

lcronos ... KDE uses pm-utils so the following section of the Arch Linux wiki should work (locking the screen on hibernate or suspend). I imagine kscreensaver could be called similarly.

best ... khay
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Sat Jul 05, 2014 10:00 am    Post subject: Reply with quote

High resolution output for Grub/kernel messages eats some extra time.
Switching from 1280x1024 to 800x600 saves about 5 secs for me.
Yes, huge letters looks not so pretty, but it helps to speed up boot.
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Sat Jul 05, 2014 1:49 pm    Post subject: Reply with quote

Okay, how do I change the resolution for that? Grub I can find easy enough, but how do I do it for the kernel messages? If I can shorten the time between the bios and when fbsplash shows I'll be happy with it.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Jul 05, 2014 3:42 pm    Post subject: Reply with quote

For speeding up slow kernel messages I add "quiet" to the boot commandline. Saves about half a second out of 3 or so spent in the console, on inteldrmfb.
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Sun Jul 06, 2014 1:45 pm    Post subject: Reply with quote

lcronos wrote:
Okay, how do I change the resolution for that? Grub I can find easy enough, but how do I do it for the kernel messages?...




/etc/defaults/grub wrote:
# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
#GRUB_GFXMODE=640x480


Uncomment GRUB_GFXMODE variable, set it to the value you like to have and run 'grub2-mkconfig -o /boot/grub/grub.cfg'

Another way to change it is adding 'vga=XXX' to kernel command line.
Available VGA modes: http://pierre.baudu.in/other/grub.vga.modes.html
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sun Jul 06, 2014 3:58 pm    Post subject: Reply with quote

lcronos wrote:
Maybe some KDE users can chip in now for some advice on loading it quickly.

I noticed quite a speedup using /bin/bb as /bin/sh symlink, but the default Gentoo busybox install is not compatible with openrc initscripts, and they weren't interested in patches. Similarly if I use mksh there are issues, and given that they didn't care about bb, I don't care to get into patches for mksh at this point. I'll likely just keep a forked version instead.

The biggest speedup I got was by getting rid of semantic-desktop; it meant losing KMail which was hard after 15 years, but I made the switch to mutt and haven't looked back. It's very fast, and I actually prefer console (yakuake shortcut) for email and news now; multiple instances aren't a problem, nor is forgetting about them at shutdown. It also enabled me to get rid of nubkit which makes me feel much better (since polkit is a security disaster waiting to happen.) Now my KDE is just as slick as 3.5.x used to be :-)

creaker knows more about getting KDE patched than I do; I'm also still a bit behind the tree.
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Wed Jul 09, 2014 5:19 pm    Post subject: Reply with quote

Thanks for all the tips, I've removed semantic-desktop from my install, and am currently trying to recompile my kernel and switch to pf-sources, atm though the new .config I'm using isn't working. Once it's up I'll try to get tuxonice working again (it doesn't seem to like fbsplash very much). Also I've heard conflicting reports about OpenRC and Systemd, is Systemd actually faster than OpenRC, or not really?
Back to top
View user's profile Send private message
mackal
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2011
Posts: 92

PostPosted: Wed Jul 09, 2014 5:33 pm    Post subject: Reply with quote

lcronos wrote:
Systemd actually faster than OpenRC, or not really?


The first thing I noticed when I switched to systemd is that it booted faster, without any extra effort. Although, I'm sure with the right amount of effort, you can get OpenRC to boot fast, but I never really put any effort into that.
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Wed Jul 09, 2014 5:40 pm    Post subject: Reply with quote

Okay, I've used both, but never on the same distro so I don't have a way to fairly compare them. I've noticed that systemd is something of a hotbutton issue in Gentoo specifically right now, what exactly is going on that's making it such a problem?
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Wed Jul 09, 2014 6:13 pm    Post subject: Reply with quote

lcronos wrote:
Okay, I've used both, but never on the same distro so I don't have a way to fairly compare them. I've noticed that systemd is something of a hotbutton issue in Gentoo specifically right now, what exactly is going on that's making it such a problem?


There is a perception among some that systemd developers/proponents want it to be the only init system for Linux, and are working with upstream to make sure that general packages either require or are-best-used-with systemd. In other words, we feel like we're being marginalized and pushed out.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Wed Jul 09, 2014 6:18 pm    Post subject: Reply with quote

Okay. That also explains why Gentoo seems to be the only one to not have it as default yet.
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Thu Jul 10, 2014 7:20 pm    Post subject: Reply with quote

So after following that guide, I still can't get my computer to lock when it hibernates.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3131

PostPosted: Thu Jul 10, 2014 7:42 pm    Post subject: Reply with quote

Quote:
lcronos
, some screensavers do that automagicaly, while others need extra trigger. Slock for example understands dbus messages well enough to wipe my screen when I hit suspend button. Slimlock didn't.
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Thu Jul 10, 2014 7:52 pm    Post subject: Reply with quote

So how do I finish getting tuxonice to work with KDE? At the moment I know that running hibernate through the cmd works, I'll try using the hibernate button in KDE (I found scripts that needed edited for tuxonice to work right with KDE).
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Thu Jul 10, 2014 8:00 pm    Post subject: Reply with quote

lol, I feel stupid. It won't like when using hibernate as a command, but if I use it through one of KDE's features it does.
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
Page 1 of 1

 
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