[systemd-devel] Improve boot-time of systemd
fykcee1 at gmail.com
fykcee1 at gmail.com
Fri Mar 18 02:35:04 PDT 2011
Hi all,
We did a series boot-time tests of systemd, and found some interesting things:
(Note the tests were performed on a laptop with a 4-core mips cpu, AMD
RS780 chipset, 2GB Memory, rotate harddisk with ext4 filesystem,
debian squeeze, Linux 2.6.36 with fanotify enabled, systemd-v20, only
boot to console.)
1. What can readahead affect boot-time?
Sadly observed negative affect -- boot-time increases at least 1s.
With bootchart, I find more I/O at boot compared with no readahead,
see attachment noreadahead-vs-readahead.png.
Thoughts: Maybe we need only monitor files with read access, not all
opend files? P.S. inotify seems enough for the job (with one more step
to open each file).
2. udev-settle.service serializes the boot process, see attachment
udev-settle.png.
I tried to create a hotplug.target(which is activated after
default.target), and made udev-settle reside at it, this rendered a
unbootable system. systemd depends on udev at early time.
Thoughts: devtmpfs is mounted, so all cold-plug jobs can be done
without udev involved.
IMHO, fast boot doesn't mean get all services ready in a short time,
but means popup an UI as soon as possible. Windows seems do hotplug
jobs after user log in.
BTW, bootchart seems not very intuitive(no service, only processes.
Also some processes may be missed if they live between two "ps aux"
call of bootchart), is it possible to add similar feature to systemd?
--
Regards,
- cee1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noreadahead-vs-readahead.png
Type: image/png
Size: 34068 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110318/4172a6be/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: udev-settle.png
Type: image/png
Size: 108387 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110318/4172a6be/attachment-0003.png>
More information about the systemd-devel
mailing list