Boot-up time optimization

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Boot-up time optimization

Postby mikex » Sun Apr 14, 2013 10:08 am

Hello,

trying to improve the boot-up time for a headless Raspberry Pi setup. When calling "systemd-analyze blame" I can see nectcfg service taking about 9s. I'm using a dhcp based ethernet connection. Is this value reasonable? If I'll only use eth0 connections (i.e. no wireless etc.) is there a way to reduce this time.

$this->bbcode_second_pass_code('', '
8744ms netcfg@ethernet-eth0.service
1356ms systemd-vconsole-setup.service
968ms systemd-udev-trigger.service
774ms systemd-logind.service
703ms avahi-daemon.service
653ms systemd-journal-flush.service
584ms systemd-modules-load.service
296ms systemd-udevd.service
268ms dev-mqueue.mount
237ms systemd-sysctl.service
230ms systemd-remount-fs.service
184ms sys-kernel-debug.mount
176ms tmp.mount
140ms systemd-random-seed-load.service
132ms systemd-user-sessions.service
108ms systemd-tmpfiles-setup.service
93ms boot.mount
73ms sys-kernel-config.mount
25ms systemd-tmpfiles-clean.service
')
mikex
 
Posts: 5
Joined: Fri Apr 12, 2013 11:39 am

Re: Boot-up time optimization

Postby graysky » Sun Apr 14, 2013 11:07 am

Seems reasonible.
$this->bbcode_second_pass_code('', '% systemd-analyze blame
8.171s netcfg@ethernet-eth0.service
1.474s systemd-vconsole-setup.service
1.083s systemd-udev-trigger.service
888ms systemd-logind.service
808ms systemd-modules-load.service
659ms systemd-tmpfiles-clean.service
...
')
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Boot-up time optimization

Postby pepedog » Sun Apr 14, 2013 12:45 pm

It might be your dhcp server taking time to respond?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Boot-up time optimization

Postby WarheadsSE » Sun Apr 14, 2013 3:15 pm

That's probably right. You might use static, or, add DHCP_OPTIONS="-A" to your netcfg. Note: netcfg is being replaced with netctl.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Boot-up time optimization

Postby pepedog » Sun Apr 14, 2013 8:15 pm

Arrrrgh
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Boot-up time optimization

Postby WarheadsSE » Sun Apr 14, 2013 8:24 pm

It's pretty simple move, really.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Boot-up time optimization

Postby pepedog » Sun Apr 14, 2013 10:34 pm

I just did an idle system. Not looking at old netcfg profile and going straight to netctl examples would have been a faster route.

Luckily POST_UP etc has replacements
ExecUpPost ExecDownPre
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Boot-up time optimization

Postby mikex » Mon Apr 15, 2013 4:34 pm

Thanks for the hints! I tried static IP and DHCP_OPTIONS="-A". Basically no significant change (within a second or so). If I do dhcpcd the DHCP server seems to answere within a second. Not sure though, if this is a good indication of the initial response time too. Anyway, total boot time is about 15s which quite o.k for me. I was just wondering why it would take the netcfg service that long. Nevertheless, if someone knows about any "ballast" I might remove to shorten the boot up time for a headless setup running only a simple websever (node.js in this case), I'd still be interested to know. Thanks again!
mikex
 
Posts: 5
Joined: Fri Apr 12, 2013 11:39 am

Re: Boot-up time optimization

Postby graysky » Mon Apr 15, 2013 7:10 pm

Using netctl is slightly faster (static setup) and since netcfg is depreciated you might as well make the switch.

$this->bbcode_second_pass_code('', '% systemd-analyze blame
6.929s netctl@static.service
2.382s monitorix.service
1.504s systemd-vconsole-setup.service
1.143s systemd-udev-trigger.service
787ms systemd-modules-load.service
767ms systemd-logind.service
...')
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Boot-up time optimization

Postby crashmaster » Tue Apr 16, 2013 12:06 am

My result:

$this->bbcode_second_pass_code('', '
5.209s systemd-vconsole-setup.service
4.560s systemd-modules-load.service
4.143s systemd-remount-fs.service
3.680s netctl@eth.service
618ms systemd-udev-trigger.service
')

I am wondering why the vconsole-setup and modules-load services are so slow ?

Totally it boots in 11.55s (RPi B, 512 MB, 1 GHz). But i have a slow SD card (without class specs), so i think reading from it slows down the process, on other RPi's i get a total boottime around 8 secs (using always static IPs).
crashmaster
 
Posts: 119
Joined: Wed Mar 13, 2013 1:00 am

Next

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 4 guests