不要なサービスのほとんどを削除した後も、起動して写真を撮り、シャットダウンするのに約28秒かかります。私はこれをさらに下げたいと思います、そして私はそうしました、systemd-analyze blame
そして、以下を得ました:
7.476s disableusb.service
1.736s keyboard-setup.service
958ms kbd.service
789ms systemd-fsck-root.service
737ms systemd-setup-dgram-qlen.service
722ms fake-hwclock.service
580ms kmod-static-nodes.service
565ms console-setup.service
534ms dev-mqueue.mount
518ms systemd-udev-trigger.service
498ms networking.service
489ms raspi-config.service
449ms hdparm.service
444ms systemd-journal-flush.service
376ms systemd-tmpfiles-setup.service
375ms dhcpcd.service
345ms systemd-logind.service
332ms ntp.service
317ms systemd-modules-load.service
281ms tmp.mount
272ms triggerhappy.service
269ms sys-kernel-debug.mount
265ms systemd-fsck@dev-mmcblk0p6.service
223ms rsyslog.service
221ms sys-kernel-config.mount
212ms systemd-tmpfiles-setup-dev.service
200ms systemd-remount-fs.service
198ms systemd-sysctl.service
184ms boot.mount
173ms systemd-random-seed.service
168ms rc-local.service
167ms user@1000.service
165ms var-log.mount
141ms udev-finish.service
130ms sys-fs-fuse-connections.mount
111ms systemd-user-sessions.service
94ms systemd-update-utmp.service
94ms alsa-restore.service
93ms systemd-update-utmp-runlevel.service
77ms systemd-udevd.service
55ms takepicture.service
disableusb.service
私のものであり、名前が意味するものとは異なり、他のことも行います。私はそこの時間を改善できるとは思えません。
私のシステムはシリアルでヘッドレスで実行されています。wifi経由のネットワーキングのみが必要です(usb電源を無効にしたためにwifiは起動しませんが、起動できないように無効にしない場合があります)。
このリストを見ると、私のようなものを参照してください1.736s keyboard-setup.service
と958ms kbd.service
。約3秒かかります。キーボードを使用していない場合に必要ですか?そうでない場合は、どうすれば無効にできますか?
ここから他に何を安全に無効にできますか?
わかりました、ここで本当に奇妙なことが起こっています。さらにいくつかのサービスを無効にしましたが、それでも全体でそれでも長くかかりますが、今ではより時間がかかるまでに時間がかからなかった一部のサービスだけが...
7.468s disableusb.service
1.676s console-setup.service
768ms systemd-logind.service
768ms systemd-fsck-root.service
726ms systemd-setup-dgram-qlen.service
714ms fake-hwclock.service
689ms networking.service
530ms systemd-journal-flush.service
524ms systemd-udev-trigger.service
509ms dev-mqueue.mount
509ms ntp.service
508ms kmod-static-nodes.service
439ms dhcpcd.service
334ms systemd-random-seed.service
331ms hdparm.service
318ms systemd-modules-load.service
281ms systemd-tmpfiles-setup.service
279ms systemd-fsck@dev-mmcblk0p6.service
279ms rsyslog.service
269ms systemd-remount-fs.service
265ms sys-kernel-config.mount
254ms systemd-tmpfiles-setup-dev.service
250ms systemd-sysctl.service
238ms rc-local.service
234ms systemd-udevd.service
232ms sys-kernel-debug.mount
224ms user@1000.service
187ms tmp.mount
176ms sys-fs-fuse-connections.mount
175ms var-log.mount
133ms systemd-update-utmp.service
122ms systemd-update-utmp-runlevel.service
122ms systemd-user-sessions.service
119ms alsa-restore.service
91ms boot.mount
88ms udev-finish.service
76ms takepicture.service
サービスファイル:(コード構文が機能しない理由はわかりません)
[Unit]
Description=Disable USB power
Before=networking.service
After=local-fs.target
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/sbin/usb_down
[Install]
これがプロットです:http : //www.eternal-lands.com/plot.svg
disableusb.service
。ところで、パッケージconvert plog.svg plog.jpg
をインストールすれば、すぐにできimagemagick
ます/
systemd-analyze plot
してここに画像を含めると、問題が何であるかがより明確になる可能性があります(タイミングを示す優れたSVGチャートが生成され、状況が明らかになるはずです)。