debloper / debloper/PiUVC

Optimizing startup delay

Open
#1 4 comments 0 reactions 1 assignee Claimed by @debloper View on GitHub
documentation
Dominant language
Shell
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Starting with a 64bit Pi OS Lite on a Raspberry Pi Zero 2 W, with [uvc-gadget 0.4.0](https://gitlab.freedesktop.org/camera/uvc-gadget/-/tags/v0.4.0) using a Camera Module v3 over v4l2 ... in this issue we try to optimize its startup time and document the improvements.

This should help up learn from it to create automated scripts when we're trying to build a custom image.

## Initial Condition:
We're reaching runlevel 3 under 20sec, with network services taking the longest time.
```bash
pi@picam:~ $ systemd-analyze
Startup finished in 5.930s (kernel) + 13.341s (userspace) = 19.271s
multi-user.target reached after 13.255s in userspace.
```
```bash
pi@picam:~ $ systemd-analyze blame
4.865s NetworkManager-wait-online.service
2.639s fstrim.service
2.539s dev-mmcblk0p2.device
1.518s ModemManager.service
1.132s systemd-udev-trigger.service
1.120s NetworkManager.service
947ms networking.service
938ms keyboard-setup.service
826ms user@1000.service
807ms systemd-timesyncd.service
740ms systemd-logind.service
709ms avahi-daemon.service
644ms dphys-swapfile.service
643ms e2scrub_reap.service
608ms ssh.service
598ms polkit.service
555ms systemd-fsck@dev-disk-by\x2dpartuuid-f1df09db\x2d01.service
553ms raspi-config.service
542ms systemd-udevd.service
527ms systemd-journald.service
523ms dbus.service
488ms systemd-journal-flush.service
419ms sshswitch.service
409ms dev-mqueue.mount
403ms sys-kernel-debug.mount
395ms sys-kernel-tracing.mount
378ms fake-hwclock.service
367ms kmod-static-nodes.service
365ms modprobe@configfs.service
363ms modprobe@dm_mod.service
361ms modprobe@drm.service
```

Our goal is to reach sub-5sec startup - preferably less than that. Best if it can expose itself as UVC gadget to the host under ~5sec (i.e. comparable to [showmewebcam](https://github.com/showmewebcam/showmewebcam))

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.