Bug#765784: systemd: Very slow boot time (4 Minutes).

Uoti Urpala uoti.urpala at pp1.inet.fi
Sat Oct 18 17:14:37 BST 2014


Marc Bonnor wrote:
> I have also poked around in the debug shell during boot and there is almost no
> cpu activity and the systemd-tmpfiles command has statuts 'D' uniteruptable
> sleep.
> 
> I used iotop to view io activity during the boot and this 'Executing: /bin
> /systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev' accounts for
> all io activity, about 99.9%. The command is reading only and the accumalated
> read size gets into the mulitple megabytes ...

If iotop shows it reading, that sounds like systemd-tmpfiles is actually
doing something then. What do you mean by "accumulated read size"
though? iotop shows no such column? If you really mean that the read
speed is well below 1 MB/s and the total read size only reaches
megabytes over time, that sounds like a very slow read speed for a
program reading at the maximum speed the system allows, even if it's
doing seek-heavy directory traversal rather than linear reads.

Try to strace the process to see what kind of activity it is doing. The
most likely guess I can think of is that tmpfiles somehow ends up
traversing some large directory tree on your machine, and spends the
time waiting for its contents to be read.

If that is what actually happens, getting a full strace log from the
start of the process could help determine what causes this. One way to
capture this would be to change systemd-tmpfiles-setup.service from
ExecStart=/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev
to something like
ExecStart=/usr/bin/strace -D -o /straceout.txt /bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev
which will write the output to /straceout.txt.




More information about the Pkg-systemd-maintainers mailing list