BeagleBone Black Boot optimization

1,377 views
Skip to first unread message

Alexander Rössler

unread,
Nov 15, 2017, 3:51:29 AM11/15/17
to BeagleBoard
Hello everyone,

I'm using the latest IoT images for the BBB and noticed that the bootup time from the eMMC is very slow. it takes ~1.5min for the USB gadget network interface to appear under Linux.

What can I do to improve the startup performance of the BBB?

So far I have disabled auto for the eth0 interface.

sudo nano /etc/network/interfaces
allow-hotplug eth0

Moreover, I have disabled graphical boot.

systemctl set-default multi-user.target
systemctl get-default

 Still very slow is the generic-board-startup.service

1min 53.980s dev-mmcblk1p1.device
   1min 50.627s generic-board-startup.service
         4.208s ModemManager.service
         4.106s systemd-udev-trigger.service
         2.366s networking.service
         2.032s NetworkManager.service
         1.973s capemgr.service
         1.838s systemd-journald.service
         1.809s pppd-dns.service
         1.579s dnsmasq.service
         1.486s rsyslog.service
         1.098s avahi-daemon.service
          920ms systemd-logind.service
          856ms systemd-udevd.service
          845ms bb-wl18xx-wlan0.service
          737ms sys-fs-fuse-connections.mount
          730ms ssh.service
          724ms systemd-sysctl.service
          719ms systemd-timesyncd.service
          651ms sys-kernel-debug.mount
          604ms systemd-update-utmp.service
          592ms dev-mqueue.mount
          559ms sys-kernel-config.mount
          493ms systemd-remount-fs.service
          458ms polkit.service
          448ms systemd-user-sessions.service
          414ms systemd-tmpfiles-setup-dev.service
          413ms systemd-tmpfiles-setup.service
          360ms systemd-random-seed.service
          359ms systemd-journal-flush.service
          319ms systemd-modules-load.service
          319ms kmod-static-nodes.service
          225ms systemd-update-utmp-runlevel.service
          168ms bb-wl18xx-bluetooth.service

 I noticed that SSH key regeneration takes ~15s at boot. However, when I removed /etc/ssh/ssh.regenerate USB networking did not work anymore.

What else can I do to make the BBB boot faster?

din...@gmail.com

unread,
Nov 15, 2017, 1:56:42 PM11/15/17
to BeagleBoard
Could you post your dmesg log?

Robert Nelson

unread,
Nov 15, 2017, 1:59:43 PM11/15/17
to Beagle Board
This is only an issue on first boot, as the keys are only generated once.



What else can I do to make the BBB boot faster?


Use the v4.14.x based kernel.

As I've spent some time building in and disabling unneeded modules.

Regards,

Alexander Rössler

unread,
Nov 18, 2017, 10:00:49 AM11/18/17
to BeagleBoard
I need an RT kernel, so 4.14 does not work for me, yet.

Are there any improvements with 4.9 over 4.4?

Robert Nelson

unread,
Nov 18, 2017, 11:34:47 AM11/18/17
to Beagle Board


On Nov 18, 2017 9:01 AM, "Alexander Rössler" <mail.ar...@gmail.com> wrote:
I need an RT kernel, so 4.14 does not work for me, yet.

Are there any improvements with 4.9 over 4.4?

Rt just came out for v4.14



I'll have something later tonight, when my plane lands.


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/6f60b064-9c00-47b3-ad4c-b6df25fb0ee3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alexander Rössler

unread,
Nov 21, 2017, 10:46:20 AM11/21/17
to BeagleBoard
Nice, thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Alexander Rössler

unread,
Nov 21, 2017, 11:38:32 AM11/21/17
to BeagleBoard
Interesting, I noticed that my ssh keys where regenerated at every single boot thanks to a wrong sshd_config.

However, after fixing this problem, my usb0 interface does not connect anymore.

Troy Weber

unread,
Feb 26, 2018, 2:02:05 PM2/26/18
to BeagleBoard
That 4.14 kernal definitely improved the boot times compared to what I was seeing and what I posted here: https://github.com/RobertCNelson/boot-scripts/issues/10

However, I am still getting a boot time of close to a minute (~32 seconds for both dev-mmcblk1p1.device and generic-board-startup.service).

# systemd-analyze 
Startup finished in 21.569s (kernel) + 37.032s (userspace) = 58.602s

# systemd-analyze blame
         32.599s dev-mmcblk1p1.device
         31.957s generic-board-startup.service
          3.137s systemd-udev-trigger.service
          2.602s loadcpufreq.service
          2.090s networking.service
          1.638s ssh.service
          1.542s connman.service
          1.385s systemd-logind.service
          1.196s systemd-journald.service
          1.164s avahi-daemon.service
          1.158s udhcpd.service
           841ms dnsmasq.service
           833ms pppd-dns.service
           786ms bb-wl18xx-wlan0.service
           623ms cpufrequtils.service
           536ms systemd-timesyncd.service
           497ms rsyslog.service
           445ms wpa_supplicant.service
           416ms systemd-random-seed.service
           367ms systemd-udevd.service
           350ms kmod-static-nodes.service
           333ms systemd-modules-load.service
           314ms systemd-sysctl.service
           311ms systemd-user-sessions.service
           311ms hostapd.service
           304ms systemd-update-utmp.service
           303ms sys-kernel-debug.mount
           301ms sys-kernel-config.mount
           297ms systemd-remount-fs.service
           275ms systemd-tmpfiles-setup.service
           248ms systemd-journal-flush.service
           220ms media-sd.mount
           206ms systemd-tmpfiles-setup-dev.service
           191ms sys-fs-fuse-connections.mount
           185ms us...@0.service

Can anything be done to really trim down the boot time to be not much more than the kernel boot time? And what does one sacrifice in doing so? A 30 second boot would be great. This 60 boot isn't too bad, either, of course, thanks for your work on that kernel 4.14.
Reply all
Reply to author
Forward
0 new messages