Score:2

เวลาบูตเครื่องนานขึ้นใน Ubuntu 20.04

ธง fr

อูบุนตูใช้เวลา 1 นาที 25 วินาทีในการบูทเครื่อง นี่คือบันทึกของ systemd-analyze critical-chain

graphical.target @1 นาที 20.643 วินาที
ââmulti-user.target @1 นาที 20.643 วินาที
  ââsnapd.seeded.service @1 นาที 10.553 วินาที +37 มิลลิวินาที
    ââsnapd.service @38.570s +31.978s
      ââbasic.target @37.598s
        ââsockets.target @37.598s
          ââsnapd.socket @37.595s +2ms
            ââsysinit.target @37.433s
              ââsnapd.apparmor.service @36.725s +706ms
                ââapparmor.service @34.732s +1.989s
                  ââlocal-fs.target @34.729s
                    ââboot-efi.mount @34.644s +84ms
                      ââsystemd-fsck@dev-disk-by\x2duuid-9CF8\x2dBDA7.service @>
                        ââdev-disk-by\x2duuid-9CF8\x2dBDA7.device @32.121s

บันทึกตำหนิ systemd-analyze มีลักษณะดังนี้

32.976s plymouth-quit-wait.service >
31.978 วินาที snapd.service >
28.705 วินาที udisks2.service >
26.038 วินาที dev-sda8.device >
บัญชี 13.347s-daemon.service >
12.292 วินาที NetworkManager-wait-online.service >
11.534s dev-loop7.device >
11.211s dev-loop8.device >
10.921s dev-loop3.device >
10.733 วินาที dev-loop2.device >
10.451 วินาที dev-loop5.device >
 9.934s dev-loop9.device >
 9.686s dev-loop4.device >
 9.532 วินาที NetworkManager.service >
 9.332s avahi-daemon.service >
 บริการบลูทูธ 9.326 วินาที >
 9.326s dev-loop0.device >
 9.057s dev-loop6.device >
 8.898s polkit.service >
 8.468s switcheroo-control.service >
 8.451 วินาที บริการด้านความร้อน >
 8.447s systemd-logind.service >
 8.232s wpa_supplicant.service >
 8.027s dev-loop1.device >
 6.343s systemd-resolved.service >
 5.664s systemd-udevd.service >
 4.572s GPU-manager.service >
 4.227s mono-xsp4.service >
 4.138s apport.service >
 4.019s ModemManager.service >
 3.765s secureboot-db.service >
 บริการ gdm.3.580s >
 3.345 วินาที e2scrub_reap.service >
 3.322 วินาที rc.local.service >
 2.942s grub-common.service >
 2.495s systemd-fsck@dev-disk-by\x2duuid-9CF8\x2dBDA7.service >
 2.214s ระบบเครือข่าย บริการ >
 2.060s systemd-modules-load.service >
 1.989s apparmor.service >
 1.693s systemd-tmpfiles-setup-dev.service >
 1.663s keyboard-setup.service >
 1.609s systemd-sysusers.service >
 1.599s grub-initrd-fallback.service >
 1.303 วินาที lm-sensors.service >
 1.263 วินาที rsyslog.service >
 1.203s plymouth-start.service >
 1.136s [email protected] >
 1.098s systemd-random-seed.service >
 1.048 วินาที resolvconf-pull-resolved.service >
 1.028s systemd-udev-trigger.service >
 1.016s systemd-sysctl.service >
  855ms systemd-tmpfiles-setup.service >
  792ms ufw.service >
  706ms snapd.apparmor.service >
  698ms snap-core18-2074.mount >
  695ms snap-wine\x2dplatform\x2d6\x2dstable-5.mount >
  642ms snap-wine\x2dplatform\x2d6\x2dstable-8.mount >
  641ms dns-clean.service >
  634ms binfmt-support.service >
  611ms snap-wine\x2dplatform\x2druntime-240.mount >
  592ms snap-snapd-12704.mount >
  557ms pppd-dns.service >
  542ms kerneloops.service >
  522ms snap-snapd-12883.mount >
  506ms systemd-backlight@backlight:intel_backlight.service >
  497ms ifupdown-pre.service >
  459ms hddtemp.service >
  401ms snap-wine\x2dplatform\x2druntime-239.mount >
  400ms snap-core18-2128.mount >
  396ms openvpn.service >
  375ms systemd-timesyncd.service >
  352ms dev-hugepages.mount >
  351ms dev-mqueue.mount >
  351ms sys-kernel-debug.mount >
  350ms sys-kernel-tracing.mount >
  348ms systemd-journal.service >
  348ms kmod-static-nodes.service >
  336ms คอนโซล-setup.service >
  316ms systemd-remount-fs.service >
  303ms packagekit.service >
  282ms uppower.service >
  269ms snap-gtk\x2dcommon\x2dthemes-1515.mount >
  252ms tlp.service >
  210ms snap-gnome\x2d3\x2d28\x2d1804-161.mount >
  200ms plymouth-read-write.service >
  188ms [email protected] >
  179ms systemd-update-utmp.service >
  172ms dev-disk-by\x2duuid-fd7235f1\x2d1d46\x2d4b9e\x2da017\x2dd9d72c3566b2.sw>
  130ms proc-sys-fs-binfmt_misc.mount >
   94ms systemd-user-sessions.service >
   84ms boot-efi.mount >
   76ms color.service >
   54ms systemd-journal-flush.service >
   52ms setvtrgb.service >
   37ms snapd.seeded.service >
   34ms [email protected] >
   32ms systemd-update-utmp-runlevel.service >
   14ms alsa-restore.service >
   13ms ureadahead-stop.service >
   10 มิลลิวินาที rtkit-daemon.service >
    2ms sys-fs-fuse-connections.mount >
    2ms snapd.socket >
    1ms sys-kernel-config.mount >

แก้ไข 1
หลังจากปิดใช้งาน NetworkManager-wait-online.service และ snapd.service
ดูเหมือนว่าบันทึก systemd-analyze critical-chain

graphical.target @1 นาที 19.553 วินาที
ââmulti-user.target @1 นาที 19.553 วินาที
  ââsnapd.seeded.service @37.019s +32.434s
    ââsnapd.service @37.813s +31.624s
      ââbasic.target @36.069s
        ââsockets.target @36.069s
          ââsnapd.socket @36.069s +554us
            ââsysinit.target @35.888 วินาที
              ââsnapd.apparmor.service @34.888s +999ms
                ââapparmor.service @33.060s +1.825s
                  ââlocal-fs.target @33.060s
                    ââboot-efi.mount @32.970s +89ms
                      ââsystemd-fsck@dev-disk-by\x2duuid-9CF8\x2dBDA7.service @>
                        ââdev-disk-by\x2duuid-9CF8\x2dBDA7.device @30.385s

ตำหนิ systemd-analyze ดูเหมือนว่า

32.742 วินาที plymouth-quit-wait.service >
32.434 วินาที snapd.seeded.service >
31.624 วินาที snapd.service >
24.802s dev-sda8.device >
22.646s udisks2.service >
บัญชี 13.990s-daemon.service >
10.964s dev-loop1.device >
10.335 วินาที NetworkManager.service >
10.306s dev-loop4.device >
10.121s dev-loop8.device >
10.065s dev-loop9.device >
10.023 วินาที dev-loop7.device >
10.012s dev-loop5.device >
 9.480s avahi-daemon.service >
 บริการบลูทูธ 9.468 วินาที >
 9.449s dev-loop0.device >
 9.095s polkit.service >
 8.814s dev-loop3.device >
 8.707s switcheroo-control.service >
 8.696s เทอร์มัลดี บริการ >
 8.684s systemd-logind.service >
 8.630s wpa_supplicant.service >
 8.422s dev-loop2.device >
 7.155s dev-loop6.device >
 5.716s systemd-udevd.service >
 4.381s GPU-manager.service >
 4.302s ModemManager.service >
 3.050s mono-xsp4.service >
 3.026 วินาที secureboot-db.service >
 2.992 วินาที systemd-resolved.service >
 apport.service ยุค 2.970 >
 2.861s e2scrub_reap.service >
 2.761 วินาที rsyslog.service >
 2.610s resolvconf-pull-resolved.service >
 2.546s systemd-fsck@dev-disk-by\x2duuid-9CF8\x2dBDA7.service >
 2.464s grub-common.service >
 2.204s ระบบเครือข่าย บริการ >
 2.076s plymouth-start.service >
 1.915s systemd-modules-load.service >
 1.825s apparmor.service >
 1.781s gdm.service >
 1.679s systemd-tmpfiles-setup-dev.service >
 1.668s systemd-sysusers.service >
 เซ็นเซอร์ lm 1.500 วินาที บริการ >
 1.407s snap-gnome\x2d3\x2d28\x2d1804-161.mount >
 1.283s grub-initrd-fallback.service >
 1.205s snap-wine\x2dplatform\x2d6\x2dstable-5.mount >
 1.170 วินาที rc.local.service >
 การตั้งค่าแป้นพิมพ์ 1.059 วินาที บริการ >
 1.058 วินาที [email protected] >
 1.046s systemd-sysctl.service >
 1.031s snap-gtk\x2dcommon\x2dthemes-1515.mount >
  999ms snapd.apparmor.service >
  952ms snap-core18-2074.mount >
  923ms snap-snapd-12883.mount >
  869ms snap-wine\x2dplatform\x2druntime-239.mount >
  837ms systemd-random-seed.service >
  805ms binfmt-support.service >
  799ms pppd-dns.service >
  790ms systemd-tmpfiles-setup.service >
  646ms systemd-udev-trigger.service >
  601ms snap-snapd-12704.mount >
  594ms tlp.service >
  592ms ufw.service >
  591ms hddtemp.service >
  569ms packagekit.service >
  534ms kerneloops.service >
  525ms snap-wine\x2dplatform\x2d6\x2dstable-8.mount >
  474ms dev-hugepages.mount >
  474ms dev-mqueue.mount >
  473ms sys-kernel-debug.mount >
  473ms sys-kernel-tracing.mount >
  471ms systemd-journal.service >
  470ms kmod-static-nodes.service >
  408ms systemd-remount-fs.service >
  405ms snap-wine\x2dplatform\x2druntime-240.mount >
  388ms snap-core18-2128.mount >
  378ms dev-disk-by\x2duuid-fd7235f1\x2d1d46\x2d4b9e\x2da017\x2dd9d72c3566b2.sw>
  374ms systemd-timesyncd.service >
  372ms ifupdown-pre.service >
  345ms systemd-backlight@backlight:intel_backlight.service >
  308ms คอนโซล-setup.service >
  298ms systemd-journal-flush.service >
  253ms uppower.service >
  197ms systemd-update-utmp.service >
  186ms [email protected] >
  185ms dns-clean.service >
  178ms color.service >
   95ms plymouth-read-write.service >
   89ms boot-efi.mount >
   85ms openvpn.service >
   84ms systemd-user-sessions.service >
   54ms proc-sys-fs-binfmt_misc.mount >
   43ms geoclue.service >
   33ms setvtrgb.service >
   22ms realmd.service >
   21ms [email protected] >
   16ms ureadahead-stop.service >
   12ms alsa-restore.service >
    8ms systemd-update-utmp-runlevel.service >
    5ms rtkit-daemon.service >
    2ms sys-fs-fuse-connections.mount >
    2ms sys-kernel-config.mount >
  554us snapd.socket >

แก้ไข 2
หลังจากรันคำสั่งนี้

sudo systemctl หยุด snapd.service และ sudo systemctl mask snapd.service

บันทึกมีลักษณะเหมือน

graphical.target @1 นาที 16.891 วินาที
ââmulti-user.target @1 นาที 16.891 วินาที
  ââModemManager.service @45.278s +5.350s
    ââpolkit.service @38.513วินาที +6.761วินาที
      ââbasic.target @37.579s
        ââsockets.target @37.579s
          ââuuidd.socket @37.579s
            ââsysinit.target @37.512s
              ââsnapd.apparmor.service @36.546s +965ms
                ââapparmor.service @33.786s +2.759s
                  ââlocal-fs.target @33.785s
                    ââboot-efi.mount @33.701s +83ms
                      ââsystemd-fsck@dev-disk-by\x2duuid-9CF8\x2dBDA7.service @>
                        ââdev-disk-by\x2duuid-9CF8\x2dBDA7.device @31.041s


31.507 วินาที plymouth-quit-wait.service >
25.108s dev-sda8.device >
23.215 วินาที udisks2.service >
11.035s dev-loop6.device >
10.919s dev-loop7.device >
10.632s dev-loop1.device >
บัญชี 10.555s-daemon.service >
10.166s dev-loop5.device >
10.163s dev-loop4.device >
 9.656s dev-loop3.device >
 9.646s dev-loop8.device >
 9.570s dev-loop0.device >
 9.545s dev-loop9.device >
 9.411s dev-loop2.device >
 7.520s avahi-daemon.service >
 บริการบลูทูธ 7.518 วินาที >
 7.224 วินาที NetworkManager.service >
 6.761 วินาที polkit.service >
 6.657 วินาที switcheroo-control.service >
 6.651s เทอร์มัลดี บริการ >
 6.649 วินาที systemd-logind.service >
 6.432 วินาที wpa_supplicant.service >
 
David avatar
cn flag
What is the actual question?
us flag
You can disable `NetworkManager-wait-online.service` (see [this](https://askubuntu.com/questions/1119167/slow-boot-issue-due-to-plymouth-quit-wait-service-ubuntu-18-04#comment1969322_1168249)) and also `snapd.service` in case you don't need snaps.
us flag
@David The actual question is "how to reduce boot time?". Is it not obvious?
sree harsha avatar
fr flag
@ArchismanPanigrahi I disabled those two services but still it is taking same time to boot
us flag
What is the new output of `systemd-analyze blame` after disabling those services? Please [edit](https://askubuntu.com/posts/1361666/edit) your question.
sree harsha avatar
fr flag
@ArchismanPanigrahi I have edited my question.
us flag
It seems that snapd.service is still there. You may need both the commands `sudo systemctl stop snapd.service` and `sudo systemctl mask snapd.service` See https://askubuntu.com/a/1269770/124466
sree harsha avatar
fr flag
@ArchismanPanigrahi afterfoloowing the above step the boot time is 1 min 22 sec
us flag
Then I have no idea. Let's wait for someone else to answer this. By any chance, do you have an old hard drive?
sree harsha avatar
fr flag
@ArchismanPanigrahi thank you for your valuable time
preIdiot avatar
ph flag
I also had this problem https://askubuntu.com/q/1279351/1112104 and the only way I find was booting ubuntu from SSD which brings boot time to 40 seconds
Artur Meinild avatar
vn flag
Does this answer your question? [What are the dev-loop services that started on boot?](https://askubuntu.com/questions/1056645/what-are-the-dev-loop-services-that-started-on-boot)
oldfred avatar
cn flag
See also: https://askubuntu.com/questions/1284302/is-it-possible-to-make-ubuntu-20-04-boot-faster & the link in that for even more suggestions.

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา