[arch-general] Optimizing boot

Daniel Micay danielmicay at gmail.com
Tue Apr 29 20:09:11 EDT 2014


On 29/04/14 07:55 PM, Toyam Cox wrote:
> On Tue, Apr 29, 2014 at 7:47 PM, Daniel Micay <danielmicay at gmail.com> wrote:
> 
>> On 29/04/14 07:34 PM, Toyam Cox wrote:
>>> On Tue, Apr 29, 2014 at 7:20 PM, Simon Brand
>>> <simon.brand at postadigitale.de>wrote:
>>>
>>>>
>>>>
>>>> Am 30.04.2014 00:06, schrieb Toyam Cox:
>>>>> NetworkManager.service is running for 12 seconds
>>>>
>>>> Can you use static ip address in your network?
>>>> The dhcp client did eat a lot of time here, too.
>>>> 9 sec boot here without cryptsetup and static ip.
>>>> Server needs 20 sec without ssd, 15 sec for dhcpcd, mysql and php-fpm
>>>>
>>>>
>>> I do not believe that would help, because often I start up in areas
>> without
>>> a network. Perhaps there is a way to get Network Manager to start after
>> the
>>> boot is completed, or at least not be a boot dependency?
>>
>> NetworkManager works fine with roaming and can be configured to use a
>> static IP on some networks but not others. I don't see what you have to
>> gain by removing it from the regular boot process... just make sure
>> you're not letting stuff block on it.
>>
>> This is with NetworkManager enabled on a wireless network with a Samsung
>> 840 EVO (it varies from ~2-3s for kernel + userspace):
>>
>> Startup finished in 3.070s (firmware) + 60ms (loader) + 1.655s (kernel)
>> + 676ms (userspace)
>>
>> 160ms NetworkManager.service
>>
>> AFAIK it doesn't count the time needed to connect over DHCP... it's
>> often not connected by the time I have a browser and a few terminals
>> open in i3 since it takes 10 seconds.
>>
>> Not that boot time should matter to anyone, since kernel upgrades aren't
>> every day and there's not much reason to reboot otherwise :P.
>>
>>
> 
> So something seems to be wrong here.
> Startup finished in 4.637s (firmware) + 131ms (loader) + 2.790s (kernel) +
> 20.066s (userspace) = 27.626s
> 
>> 12s NetworkManager.service
> 
> What sort of things should I check for? Is there an /etc config file I can
> play with?

Use an efistub loader like gummiboot if you're not already, use lz4
compression for the kernel, disable staggered spin-up, use a single
unsplit root partition and avoid remounting it, etc. I'm sure these
things are all on the wiki somewhere, because I remember writing some of it.

There's not really any magic to speed up starting a large number of
services, if that's what you're doing. All I have enabled is
chrony/pdnsd/NetworkManager and they don't block the boot process. I
just use agetty to start up i3.

I assume you've got something on the critical path depending on
NetworkManager like a Type=idle service.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20140429/77c2118d/attachment.asc>


More information about the arch-general mailing list