You are not logged in.

#1 2012-02-12 20:17:57

LLStarks
Member
Registered: 2012-01-26
Posts: 22

Optimizing boot

rc.conf: http://pastebin.com/mAywZZ1w
bootchart: http://i.minus.com/ibo9lB5cdAkReT.png

Any advice is welcome. I'm still learning the rules that govern rc.conf.

Last edited by LLStarks (2012-02-12 20:21:07)

Offline

#2 2012-02-12 23:34:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: Optimizing boot

I would remove cpufreq_ondemand from modules since you're using laptop-mode. Personally, I would load the logger earlier so messages start getting captured earlier in the process.

I don't background dbus because I believe later stuff requires it.

It depends what you mean by 'opitmise'. Just the fastest?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2012-02-12 23:49:02

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Optimizing boot

cfr wrote:

I would remove cpufreq_ondemand from modules since you're using laptop-mode.

Err, no. Ondemand is the best governor to use. It's all about the Race to idle

@LLStarks: What exactly are you trying to optimize? Boot speed? If so, the biggest win would be compiling your own kernel and getting rid of the initramfs. Then, the only other thing I can think of is not use gnome. Yeah, that's a harsh one, but a large part there is loading gnome services.

Offline

#4 2012-02-13 03:45:23

LLStarks
Member
Registered: 2012-01-26
Posts: 22

Re: Optimizing boot

Yeah, trying to boot as fast as possible.

Under 30s like Ubuntu would be nice. Arch could really benefit from ureadahead being packaged.

Getting rid of Gnome/Cinnamon is not an option.

Offline

#5 2012-02-13 04:42:22

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Optimizing boot

If you are willing to put a little work into it, you can try using systemd (which you appear to have installed for some odd reason...) instead of the standard initscripts. It has readahead support (systemd-readahead-{collect,replay}) and starts everything in parallel. However, it isn't officially supported (AFIK) and you may end up breaking your system.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#6 2012-02-13 16:08:54

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Optimizing boot

<rant>
I'm sorry - and I might well be too old-fashioned - but ...
I just do not understand the troubles some people are willing to go to to shave a couple of seconds off the boot-time. This is _linux_ folks - you don't need to reboot every so often!
Me - I reboot whenever there is a kernel or glib update - not otherwise. Not to talk of my servers - they just go and go and go - why would I reboot them as long as they work? And seeing they are up for weeks at a time - what does some measly seconds more or less mean? Zilch!
</rant>

Last edited by perbh (2012-02-13 16:09:53)

Offline

#7 2012-02-13 16:15:53

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Optimizing boot

I quite agree with you perbh. I don't see the big deal with boot times. Even with my netbook, which I turn on only when I need it. Compared to how much time I'll spend at the machine, does it really matter if I start doing stuff in 35s or 30s (note, these are guesses, I haven't actually measured start time) after pressing the power button? Hell, no. Obsession with boot time is just that - obsession.

Offline

#8 2012-02-13 16:47:34

meph
Member
Registered: 2011-06-06
Posts: 160

Re: Optimizing boot

cfr wrote:

I don't background dbus because I believe later stuff requires it.

Agree with this. You can background more or less anything, but I wouldn't advise it with dbus.


Running arch is like raising a puppy - if you spend a bit of time with it each day and do just a bit of training you'll end up with the most loyal partner you could want; if you lock it in a room and don't check on if for several days, it'll tear apart your stuff and poop everywhere.

Offline

#9 2012-02-13 17:19:42

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Optimizing boot

I think you should lesser the amount of DAEMONS (for example, loose GDM as DAEMON and use inittab) and you should look into e4rat


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#10 2012-02-13 21:32:35

LLStarks
Member
Registered: 2012-01-26
Posts: 22

Re: Optimizing boot

e4rat is pretty fast.

I had gdm in both daemons and inittab.

D:

Offline

#11 2012-02-14 01:33:58

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: Optimizing boot

Gusar wrote:

Err, no. Ondemand is the best governor to use. It's all about the Race to idle

I'm not denying ondemand is the best governor. But laptop-mode-tools sets the governor to ondemand so if that's being loaded (see the DAEMONS array), my understanding was that it was not necessary to include it in the MODULES array.  Of course, you can tell laptop-mode-tools not to do this but that's the default config.

Or are you saying that loading it explicitly in MODULES will get it loaded sooner and speed the boot process? I admit when I set mine up I was more concerned with power saving than boot speed, so I may well not have noticed if that was mentioned somewhere.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#12 2012-02-14 09:05:48

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Optimizing boot

cfr wrote:

I'm not denying ondemand is the best governor. But laptop-mode-tools sets the governor to ondemand so if that's being loaded (see the DAEMONS array), my understanding was that it was not necessary to include it in the MODULES array

Oh, that's what you meant. That's different. I thought you said to not use the ondemand governor.

Offline

#13 2012-02-14 18:48:04

lucain
Member
From: Mexico
Registered: 2009-10-25
Posts: 19
Website

Re: Optimizing boot

I don't think that tweaking a better boot time is a complete waste of time, there are many users that need to reboot on a dual system computer (ArchLinux + Otherlinux/windows/os x) and a good boot time is always good.

My two cents goes to OpenBox or al lighter WM + systemd

Offline

#14 2012-02-14 21:46:40

LLStarks
Member
Registered: 2012-01-26
Posts: 22

Re: Optimizing boot

I'd use systemd, but there's no way to cancel an fsck and I sometimes mount my /home in Windows.

Offline

#15 2012-02-14 22:54:10

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: Optimizing boot

I agree with other comments about the relative unimportance of boot times. I tend to get nervous about not rebooting, though. Also, things seem to require rebooting quite a lot so I reboot a lot more than I did OS X, say. I don't honestly know how to tell when an update requires a reboot to take effect and when it doesn't so I tend to assume they all do...

But I still find it hard to get that worked up about boot times. Very occasionally, I would give a great deal for it to be faster than instant. But generally, it doesn't make much odds. But perhaps my computer is unusual - it seems to be able to boot up even if I'm reading or nip down the corridor to put the kettle on!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#16 2012-02-15 02:11:33

meph
Member
Registered: 2011-06-06
Posts: 160

Re: Optimizing boot

cfr wrote:

I agree with other comments about the relative unimportance of boot times. I tend to get nervous about not rebooting, though. Also, things seem to require rebooting quite a lot so I reboot a lot more than I did OS X, say. I don't honestly know how to tell when an update requires a reboot to take effect and when it doesn't so I tend to assume they all do...

But I still find it hard to get that worked up about boot times. Very occasionally, I would give a great deal for it to be faster than instant. But generally, it doesn't make much odds. But perhaps my computer is unusual - it seems to be able to boot up even if I'm reading or nip down the corridor to put the kettle on!

You don't need to be nervous about that. Rule of a thumb could be to reboot after a kernel update or a kernel module update (such as virtualbox-modules), otherwise logging off and back in will mostly do the trick. Also, I tend to save my -Syu until just before I would reboot/shutdown anyway, so it doesn't really matter.

Anyway, agree with the opinion that boot time is relatively unimportant. If there was an easy way to make it faster, then I would obviously do it, but I won't spend hours doing research about the matter or some extensive esting.


Running arch is like raising a puppy - if you spend a bit of time with it each day and do just a bit of training you'll end up with the most loyal partner you could want; if you lock it in a room and don't check on if for several days, it'll tear apart your stuff and poop everywhere.

Offline

#17 2012-02-15 03:32:43

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Optimizing boot

perbh wrote:

<rant>
I'm sorry - and I might well be too old-fashioned - but ...
I just do not understand the troubles some people are willing to go to to shave a couple of seconds off the boot-time. This is _linux_ folks - you don't need to reboot every so often!
Me - I reboot whenever there is a kernel or glib update - not otherwise. Not to talk of my servers - they just go and go and go - why would I reboot them as long as they work? And seeing they are up for weeks at a time - what does some measly seconds more or less mean? Zilch!
</rant>

For those of us who use their laptops in place of smart phones, a fast boot is necessary.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#18 2012-02-15 20:58:43

LLStarks
Member
Registered: 2012-01-26
Posts: 22

Re: Optimizing boot

Do you guys think LightDM or LXDM would shave any more time?

Offline

Board footer

Powered by FluxBB