On Thursday, 20 May, 2021 at 11:01:42 pm UTC+5:30 RobertCNelson wrote:
> > removed wpasupplicant and connman and old kernel > > > > sudo apt-get purge linux-image-4.14.108-ti-r134 wpasupplicant connman > > > > debian@beaglebone:~$ systemd-analyze > > > > Startup finished in 13.502s (kernel) + 36.686s (userspace) = 50.188s > > > > I then removed the initrd file in /boot directory (From what I > understand this kernel does not necessarily need initrd). > > debian@beaglebone:/boot$ sudo mv initrd.img-4.19.94-ti-rt-r63 > moved-initrd.img-4.19.94-ti-rt-r63 > > > > Removing the initrd gives the max speedup for kernel. From 10s-13s with > initrd, it reduces to 1s-2s > > debian@beaglebone:~$ systemd-analyze > > Startup finished in 1.663s (kernel) + 36.385s (userspace) = 38.048s > > debian@beaglebone:~$ systemd-analyze blame > > 1min 4.266s dev-mmcblk1p1.device > > 26.360s generic-board-startup.service > > 3.847s systemd-udev-trigger.service > > 2.824s loadcpufreq.service > > You can nuke this ^, it's really only for am57xx, so we can > downclock.. But on am335x, let it run at full speed as these are set: > > CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y > CONFIG_CPU_FREQ_GOV_PERFORMANCE=y > > > 2.215s networking.service > > 1.647s ssh.service > > 1.396s us...@1000.service > > 1.209s rsyslog.service > > 1.189s systemd-journald.service > > 999ms dnsmasq.service > > 897ms cpufrequtils.service > > Same as above.. > > > 855ms systemd-timesyncd.service > > 674ms systemd-fsck-root.service > > 642ms systemd-logind.service > > 505ms systemd-udevd.service > > 445ms systemd-user-sessions.service > > 408ms systemd-tmpfiles-setup-dev.service > > 389ms systemd-update-utmp.service > > 375ms hostapd.service > > You nuked wpasupplicant, get rid of hostapd.. > > > 365ms systemd-modules-load.service > > 326ms dev-mqueue.mount > > 324ms systemd-random-seed.service > > 312ms sys-kernel-config.mount > > 291ms systemd-tmpfiles-setup.service > > 274ms sys-kernel-debug.mount > > 236ms kmod-static-nodes.service > > 231ms sys-fs-fuse-connections.mount > > 200ms systemd-remount-fs.service > > 190ms systemd-journal-flush.service > > 185ms systemd-sysctl.service > > 145ms systemd-update-utmp-runlevel.service > > 130ms systemd-tmpfiles-clean.service > > > > Next point to attack is the generic-board-startup.service. The main time > that process spends is in the file /opt/scripts/boot/am335x_evm.sh > > This takes care of the USB flash, Serial and network gadgets that are > initialized. Remove items which are not needed. It also has a lot of > generic selections for Beagle family boards which can be removed. I am > working on my version for just beaglebone black with only network over USB > support. > > Some ideas can be found here ( > https://github.com/RobertCNelson/boot-scripts/issues/10) > > > > Hope that helps. > > -- > Robert Nelson > https://rcn-ee.com/ Thanks a lot Robert. Your help is most appreciated. I have implemented your suggestions and removed the following services loadcpufreq.service cpufrequtils.service hostapd.service My current boot time still ranges between 48s to 52s debian@beaglebone:~$ systemd-analyze Startup finished in 1.751s (kernel) + 48.369s (userspace) = 50.120s debian@beaglebone:~$ systemd-analyze blame 1min 14.318s dev-mmcblk1p1.device 9.419s generic-board-startup.service 5.353s systemd-udev-trigger.service 2.470s keyboard-setup.service 2.438s networking.service 2.423s ssh.service 2.161s dnsmasq.service 1.718s systemd-logind.service 1.613s systemd-journald.service 1.018s systemd-timesyncd.service 969ms systemd-fsck-root.service 730ms systemd-udevd.service 595ms user@1001.service 589ms rsyslog.service 549ms slim.service 500ms sys-kernel-debug.mount 488ms systemd-tmpfiles-setup-dev.service 479ms systemd-update-utmp.service 469ms dev-mqueue.mount 456ms systemd-sysctl.service 451ms systemd-tmpfiles-setup.service 384ms systemd-modules-load.service 380ms sys-kernel-config.mount 352ms systemd-journal-flush.service 344ms systemd-user-sessions.service 319ms systemd-update-utmp-runlevel.service 310ms systemd-random-seed.service 284ms kmod-static-nodes.service 257ms sys-fs-fuse-connections.mount 250ms systemd-remount-fs.service 227ms console-setup.service Any suggestions to bring it down further? I am using a X desktop with slim as the login manager with autologin on LCD. >From the generic board startup services, I am using network over USB (not the serial over USB and flash over USB) parts. What else should I be able to nuke to get the time faster? Regards, -amit -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/2980cc32-e3fe-4405-a18e-f063088da1d5n%40googlegroups.com.