Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo taking shamefully long to 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
Asch
n00b
n00b


Joined: 20 Jan 2010
Posts: 18

PostPosted: Sat Apr 14, 2012 11:01 pm    Post subject: Gentoo taking shamefully long to boot. Reply with quote

So, while customizing my fabulous gentoo box, I never gave much attention to the boot process. Now I realized that It is taking shameful 50 seconds to boot. It is bad, compared to windows 7, which takes about 30 seconds. I understand that some of you may think of it as futile, but it is really for me a matter of honor: I want my system to be better than those of those damn lammers in every aspect, not just mem consumption, eyecandy, battery life, and overall performance: boot time is crucial for it to look like having superior performance, and in PR appearance is key.

So, the scenario is the following:
  • I have a fully monolithic kernel, compressed with the LZMA method. Would a modular kernel boot faster?
  • I'm using e4rat: I'm using only two partitions: one 5GB swap and the other is a ext4, using the remaining of the HDD
  • I'm using also readahead-list, emerged from the gentoo tree, with default configuration. Does it make critical difference? Would it make much of a difference if I tweak it thoroughly like suggested by the painfully outdated gentoo-wiki?
  • I have dracut at hand, but I believe it actually makes booting longer, but I could try using it with the minimal modules necessary to see if that works.


So, that's all. I hope you can be of help to me, even though OTW seems to be a somewhat shoddy place.[/list]
_________________
Contributing to dumbassification of Gentoo forums since 2011.
Back to top
View user's profile Send private message
Dr.Willy
Apprentice
Apprentice


Joined: 15 Jul 2007
Posts: 288
Location: NRW, Germany

PostPosted: Sat Apr 14, 2012 11:04 pm    Post subject: Reply with quote

Shouldn't you look into removing unneccessary programs from boot and parallelizing those that remain?
Back to top
View user's profile Send private message
Boris27
Guru
Guru


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

PostPosted: Sat Apr 14, 2012 11:36 pm    Post subject: Reply with quote

Cheat. Windows only starts certain things after login, or did you include that in your 30 second estimate?

Certain services can easily be deferred till after boot.
_________________
we are microsoft, lower your firewalls and surrender your pc's. we will add your biological and technological distinctiveness to our own. your culture will adapt and service us. resistance is futile.
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Sat Apr 14, 2012 11:54 pm    Post subject: Reply with quote

Doesn't readaheadlist preload programs during boot so that they load faster once they are needed? If anything that would increase boot time. Anyways, all of the tricks combined I've tried long time ago didn't manage to bring down boot time by a measurable amount. What did reduce it was a different init (with openrc the standard should be perfect now), parallelizing, removing unnecessary boot services and kernel options.

No, I don't think that a modular kernel would be faster, that would really surprise me.[/list]


edit: http://ompldr.org/vZGRuNA/bootchart.png 19 seconds :cool:


Last edited by ichbinsisyphos on Sun Apr 15, 2012 12:02 am; edited 1 time in total
Back to top
View user's profile Send private message
Prenj
n00b
n00b


Joined: 20 Nov 2011
Posts: 7
Location: Mostar, BiH

PostPosted: Sun Apr 15, 2012 12:01 am    Post subject: Reply with quote

windows cheats. after you log in, it still loads stuff for at least a minute.
Back to top
View user's profile Send private message
BoneKracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1488
Location: U.S.A.

PostPosted: Sun Apr 15, 2012 1:26 am    Post subject: Reply with quote

ichbinsisyphos wrote:
edit: http://ompldr.org/vZGRuNA/bootchart.png 19 seconds :cool:

Is that from back when you had a working system, or did you get your X problem sorted out?[/List]
_________________
Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four.


Last edited by BoneKracker on Sun Apr 15, 2012 1:59 am; edited 1 time in total
Back to top
View user's profile Send private message
BoneKracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1488
Location: U.S.A.

PostPosted: Sun Apr 15, 2012 1:37 am    Post subject: Reply with quote

Prenj wrote:
windows cheats. after you log in, it still loads stuff for at least a minute.

Yes, and this is most annoying.
_________________
Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four.
Back to top
View user's profile Send private message
mcgruff
Tux's lil' helper
Tux's lil' helper


Joined: 28 Dec 2004
Posts: 137

PostPosted: Sun Apr 15, 2012 1:52 am    Post subject: Re: Gentoo taking shamefully long to boot. Reply with quote

Asch wrote:
So, that's all. I hope you can be of help to me, even though OTW seems to be a somewhat shoddy place.


Ask for your money back.
_________________
the underlay overlay
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16029
Location: Colorado

PostPosted: Sun Apr 15, 2012 2:00 am    Post subject: Reply with quote

Moved from Off the Wall to Other Things Gentoo.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7022

PostPosted: Sun Apr 15, 2012 2:11 am    Post subject: Reply with quote

Maybe e4rat will help.
Back to top
View user's profile Send private message
ichbinsisyphos
Guru
Guru


Joined: 08 Dec 2006
Posts: 547

PostPosted: Sun Apr 15, 2012 2:14 am    Post subject: Reply with quote

PaulBredbury wrote:
Maybe e4rat will help.
Does ext4 have a problem accessing a lot of small files or fragmentation or what?
Back to top
View user's profile Send private message
BoneKracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1488
Location: U.S.A.

PostPosted: Sun Apr 15, 2012 3:04 am    Post subject: Reply with quote

PaulBredbury wrote:
Maybe e4rat will help.

He's already using e4rat. :lol:
_________________
Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four.
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2063

PostPosted: Sun Apr 15, 2012 12:46 pm    Post subject: Reply with quote

50s starting at what point? Power on, bootloader, kernel, init?

My notebook takes <20s from the push of the powerbutton to login(non-graphical), activating swap alone somehow takes ~3s - gotta find a way to delay that properly.

That's on a rather slow SSD without tools like readahead or e4rat, just openrc running in parallel - but I admit, there aren't much service loaded by default.
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1633

PostPosted: Sun Apr 15, 2012 2:05 pm    Post subject: Reply with quote

Nobody mentioned systemd yet!
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2063

PostPosted: Sun Apr 15, 2012 2:11 pm    Post subject: Reply with quote

Etal wrote:
Nobody mentioned systemd yet!
thankfully, then you came around :twisted:
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
Ant P.
Veteran
Veteran


Joined: 18 Apr 2009
Posts: 1920
Location: UK

PostPosted: Sun Apr 15, 2012 2:34 pm    Post subject: Reply with quote

It'd help to see the output of bootchart...
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 322
Location: Ontario, Canada

PostPosted: Sun Apr 15, 2012 5:40 pm    Post subject: Re: Gentoo taking shamefully long to boot. Reply with quote

Asch wrote:
I have a fully monolithic kernel, compressed with the LZMA method.

If your storage is fast and your CPU slow, you may find slightly better results with a less aggressive compression method, either gzip or lzo (but this doesn't sound like the case). A modular kernel would be likely to help if you have quite a few built-in options which aren't always needed at boot -- such as building usbstorage into the kernel, when you only rarely connect a USB drive.

This really depends on where the slow part of the boot process is, though -- if it gets to init fast, then you're not going to see any changes to your kernel image make much of a difference.
Back to top
View user's profile Send private message
ak47gen
n00b
n00b


Joined: 15 Feb 2007
Posts: 36

PostPosted: Sun Apr 15, 2012 5:50 pm    Post subject: Re: Gentoo taking shamefully long to boot. Reply with quote

Asch wrote:
So, while customizing my fabulous gentoo box, I never gave much attention to the boot process. Now I realized that It is taking shameful 50 seconds to boot. It is bad, compared to windows 7, which takes about 30 seconds. I understand that some of you may think of it as futile, but it is really for me a matter of honor: I want my system to be better than those of those damn lammers in every aspect, not just mem consumption, eyecandy, battery life, and overall performance: boot time is crucial for it to look like having superior performance, and in PR appearance is key.

So, the scenario is the following:
  • I have a fully monolithic kernel, compressed with the LZMA method. Would a modular kernel boot faster?
  • I'm using e4rat: I'm using only two partitions: one 5GB swap and the other is a ext4, using the remaining of the HDD
  • I'm using also readahead-list, emerged from the gentoo tree, with default configuration. Does it make critical difference? Would it make much of a difference if I tweak it thoroughly like suggested by the painfully outdated gentoo-wiki?
  • I have dracut at hand, but I believe it actually makes booting longer, but I could try using it with the minimal modules necessary to see if that works.


So, that's all. I hope you can be of help to me, even though OTW seems to be a somewhat shoddy place.[/list]


LZO would probably be the quickest. I only use GZIP so far.

It is up to what you want to load and how you load it. To be honest the fastest you can get for boot time is to only boot what you need to through rc-update del. Also build your own kernel.

Also post a boot chart to what is taking longest to start up.

An example.
http://img147.imageshack.us/img147/5431/bootchartep4.png
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1190
Location: Adelaide/Australia

PostPosted: Sun Jun 17, 2012 10:28 am    Post subject: Reply with quote

What I do is look at what is scheduled to start in my default runlevel.
I then decide what is unnecessary at login, such as apache, mysql, etc. I update the /etc/init.d/{script} to have an 'after xdm' dependency.
See if this helps.
_________________
...Lyall
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