Hello ,
               I am looking into optimizing the boot / systemd service  
ordering for my embedded target hardware related to achieving fast boot options.

---- The systemd-analyze report shown the delay between start of systemd init 
and the activation of my basic.target where the application services and 
deamons are activated is close to 4 sec. This time is being spent for the 
following special targets and dependent services in the following order...

Systemd  ( activation of systemd happens @ 3.57 from cold start (uboot+kernel 
init))
-.mount
systemd-ask-password-wall.path
syslog.socket
remote-fs.target
systemd-shutdownd.socket
systemd-initctl.socket
-.slice
user.slice
system.slice
slices.target
system-getty.slice
system-serial\x2dgetty.slice
systemd-ask-password-console.path
paths.target
systemd-udevd-kernel.socket
systemd-udevd-control.socket
systemd-journald.socket
systemd-udev-trigger.service (1.309s)
systemd-modules-load.service (949ms)
systemd-sysctl.service (909ms)
systemd-journald.service
kmod-static-nodes.service (1.079s)
swap.target
tmp.mount (650ms)
systemd-remount-fs.service (480ms)
systemd-random-seed.service (329ms)
sys-fs-fuse-connections.mount (265ms)
systemd-tmpfiles-setup-dev.service (89ms)
systemd-udevd.service (261ms)
local-fs-pre.target
var-volatile.mount (48ms)
local-fs.target
systemd-journal-flush.service (97ms)
systemd-tmpfiles-setup.service (310ms)
systemd-update-utmp.service (189ms)
run-postinsts.service (117ms)
sys-subsystem-net-devices-eth0.device
sys-devices-platform-enet.0-net-eth0.device
dev-ttymxc0.device
sys-devices-platform-imx\x2duart.0-tty-ttymxc0.device
dev-ttymxc1.device
sys-devices-platform-imx\x2duart.1-tty-ttymxc1.device
dev-ttymxc2.device
sys-devices-platform-imx\x2duart.2-tty-ttymxc2.device
dev-ttymxc4.device
sys-devices-platform-imx\x2duart.4-tty-ttymxc4.device
dev-ttymxc3.device
sys-devices-platform-imx\x2duart.3-tty-ttymxc3.device
sys-devices-platform-soc\x2daudio.0-sound-card0.device
sound.target
sysinit.target
gpsd.socket
systemd-tmpfiles-clean.timer
timers.target
alsa-restore.service (1.263s)
dbus.socket
sockets.target
basic.target
               ->>> Services listed with basic target start activation 7.5 sec)


I looked into the documentation of systemd (boot sequence) 
http://man7.org/linux/man-pages/man7/bootup.7.html
and my understanding is that the above chain of mentioned targets are per 
systemd recommended boot order.

Now based on my understanding...

1/ Is there a recommended way to re-organize the boot target order ( I don't 
see there is a way to fit my userlevel application executables or deamons 
needed for early functionality to be associated with these "primitive target" 
appearing in the boot chain".

2/ Is there a way to define custom target like "early-boot.target" and can be 
placed well on top of these special targets which can be used to start my user 
space applications that needs to be started well early during the boot process 
( for example my full functional UI to be available within 8 sec from a cold 
boot which is has a X11 dependency) . So I mean that I need a way to start the 
X11 and my UI executable soon after systemd gets initialized and very early 
during the boot process.Currently the service files for the X11 and UI after 
associated with the basic.target and now the service activation can happen only 
around 7 sec after power on and when the basic.target is activated.

3/ Is there any special consideration to disable these special targets like 
(swap.target,local-fs target if they are not used in the embedded devices?).

Please provide the recommendation or point to any links/previous discussions. I 
read through the http://freedesktop.org/wiki/Software/systemd/Optimizations/ a 
very helpful note on optimization ,but couldn't infer much on how to work 
around this sequencing issue.

Regards
Vibin



_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to