My boots and shutdowns have really become excessively long. I have started several threads on my issues; none of which has given an effective solution.
But now I am seeing in "systemd-analyze "and “system-analyze blame” that mlocate is taking 1min and 10 seconds on boots and 3 minutes and 30 seconds on shutdowns. mlocate is a file logging and search/find file service. It updates it’s database (“updatedb”) once per day in a cron service as I believe. Running a manual “updatedb” process generally is less than a minute. See snip below:
**mydesktop:/home/tom #** systemd-analyze blame | head -n 10
1min 31.321s mlocate.service
1min 6.176s systemd-udev-settle.service
26.991s backup-rpmdb.service
19.318s plymouth-quit-wait.service
5.012s udisks2.service
4.194s systemd-rfkill.service
3.216s initrd-switch-root.service
2.432s polkit.service
2.276s avahi-daemon.service
2.275s bluetooth.service
**mydesktop:/home/tom #**
Is anyone knowledgeabele as to what mlocate is doing in boot and shutdown that could be taking so long?
I will shutdown mlocate and run some tests to see that mlocate is really the factor that systemd reports or maybe there is something running it that is the factor.
Any insights re: mlocate? thanks, tom kosvic
My errors in previous post.
Title: mlocate is major factor in long boots and shutdowns
Code tags – apparently I pasted improperly. If someone can correct please do.
tom kosvic
Delete mlocate and normal - approx 1 minute shutdown/restart. See code below:
**mydesktop:/home/tom #** systemd-analyze blame | head -n 10
1min 5.939s systemd-udev-settle.service
19.314s plymouth-quit-wait.service
5.083s lvm2-monitor.service
3.192s initrd-switch-root.service
2.915s libvirtd.service
2.617s udisks2.service
2.430s polkit.service
2.287s smartd.service
2.268s avahi-daemon.service
2.266s bluetooth.service
**mydesktop:/home/tom #**
FYI, tom kosvic
Gene_S
January 4, 2022, 9:09pm
#4
You can see that it only runs when the timer calls for it on my system.
> jctl-n -b -u mlocate
-- Journal begins at Tue 2021-12-21 10:11:07 PST, ends at Tue 2022-01-04 11:57:02 PST. --
-- No entries --
> jctl-n -b -1 -u mlocate
-- Journal begins at Tue 2021-12-21 10:11:07 PST, ends at Tue 2022-01-04 11:57:02 PST. --
Jan 04 09:30:16 Mobile-PC systemd[1]: Starting Update locate database...
Jan 04 09:30:16 Mobile-PC su[2602]: (to nobody) root on none
Jan 04 09:30:17 Mobile-PC su[2602]: pam_unix(su:session): session opened for user nobody(uid=65534) by (uid=0)
Jan 04 09:30:17 Mobile-PC systemd[1]: mlocate.service: Deactivated successfully.
Jan 04 09:30:17 Mobile-PC systemd[1]: Finished Update locate database.
I’m not sure why it’s running at startup and shutdown for you, it’s supposed to be triggered by mlocate.time.
> systemctl status mlocate.service
○ mlocate.service - Update locate database
Loaded: loaded (/etc/systemd/system/mlocate.service; static)
Active: inactive (dead)
TriggeredBy: ● mlocate.timer
Docs: man:updatedb
> systemctl status mlocate.timer
● mlocate.timer - Daily locate database update
Loaded: loaded (/etc/systemd/system/mlocate.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Tue 2022-01-04 10:15:32 PST; 1h 52min ago
Trigger: Wed 2022-01-05 00:00:00 PST; 11h left
Triggers: ● mlocate.service
Docs: man:updatedb
Jan 04 10:15:32 Mobile-PC systemd[1]: Started Daily locate database update.
Gene
Gene_S
January 4, 2022, 9:37pm
#5
I found this old fedora bug, https://bugzilla.redhat.com/show_bug.cgi?id=1282232 . Is it still a problem in opensuse?
Gene
tckosvic:
My boots and shutdowns have really become excessively long. I have started several threads on my issues; none of which has given an effective solution.
But now I am seeing in "systemd-analyze "and “system-analyze blame” that mlocate is taking 1min and 10 seconds on boots and 3 minutes and 30 seconds on shutdowns. mlocate is a file logging and search/find file service. It updates it’s database (“updatedb”) once per day in a cron service as I believe. Running a manual “updatedb” process generally is less than a minute. See snip below:
**mydesktop:/home/tom #** systemd-analyze blame | head -n 10
1min 31.321s mlocate.service
1min 6.176s systemd-udev-settle.service
26.991s backup-rpmdb.service
19.318s plymouth-quit-wait.service
5.012s udisks2.service
4.194s systemd-rfkill.service
3.216s initrd-switch-root.service
2.432s polkit.service
2.276s avahi-daemon.service
2.275s bluetooth.service
**mydesktop:/home/tom #**
Is anyone knowledgeabele as to what mlocate is doing in boot and shutdown that could be taking so long?
I will shutdown mlocate and run some tests to see that mlocate is really the factor that systemd reports or maybe there is something running it that is the factor.
Any insights re: mlocate? thanks, tom kosvic
Show the following:
**erlangen:~ #** systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.
graphical.target @2.186s
└─**display-manager.service @1.582s +603ms**
└─**apache2.service @1.263s +317ms**
└─time-sync.target @1.260s
└─**chronyd.service @1.159s +100ms**
└─nss-lookup.target @1.157s
└─**systemd-resolved.service @979ms +177ms**
└─**systemd-networkd.service @890ms +84ms**
└─**systemd-udevd.service @813ms +45ms**
└─**systemd-hwdb-update.service @384ms +427ms**
└─**systemd-remount-fs.service @321ms +58ms**
└─**systemd-fsck-root.service @584542y 2w 2d 20h 1min 49.124s +12ms**
└─systemd-journald.socket
└─system.slice
└─-.slice
**erlangen:~ #**
**erlangen:~ #** journalctl -b -o short-monotonic -u init.scope -g Reached
-- Journal begins at Wed 2021-12-29 21:57:19 CET, ends at Tue 2022-01-04 22:46:30 CET. --
3.318222] erlangen systemd[1]: Reached target System Initialization.
3.319510] erlangen systemd[1]: Reached target Path Units.
3.319549] erlangen systemd[1]: Reached target Basic System.
3.489805] erlangen systemd[1]: Reached target Initrd Root Device.
3.872715] erlangen systemd[1]: Reached target Preparation for Remote File Systems.
3.872768] erlangen systemd[1]: Reached target Remote File Systems.
3.959172] erlangen systemd[1]: Reached target Initrd Root File System.
4.132428] erlangen systemd[1]: Reached target Initrd File Systems.
4.132475] erlangen systemd[1]: Reached target Initrd Default Target.
4.189671] erlangen systemd[1]: Reached target Switch Root.
4.747078] erlangen systemd[1]: Reached target Preparation for Local File Systems.
4.766835] erlangen systemd[1]: Reached target Local File Systems.
5.160653] erlangen systemd[1]: Reached target System Initialization.
5.162921] erlangen systemd[1]: Reached target Path Units.
5.163481] erlangen systemd[1]: Reached target Socket Units.
5.163607] erlangen systemd[1]: Reached target Basic System.
5.458051] erlangen systemd[1]: Reached target Network.
5.458184] erlangen systemd[1]: Reached target Network is Online.
5.458311] erlangen systemd[1]: Reached target Host and Network Name Lookups.
5.561738] erlangen systemd[1]: Reached target System Time Synchronized.
5.563866] erlangen systemd[1]: Reached target Timer Units.
5.664317] erlangen systemd[1]: Reached target Sound Card.
5.884519] erlangen systemd[1]: Reached target Login Prompts.
6.141082] erlangen systemd[1]: Reached target Multi-User System.
6.487416] erlangen systemd[1]: Reached target Graphical Interface.
**erlangen:~ #**
Boot time is completely unrelated to mlocate completion time:
**erlangen:~ #** systemd-analyze
Startup finished in 13.212s (firmware) + 4.360s (loader) + 2.198s (kernel) + 2.102s (initrd) + 2.193s (userspace) = 24.067s
graphical.target reached after 2.186s in userspace
**erlangen:~ #** systemd-analyze blame | grep mlocate
3min 4.675s **mlocate**.service
**erlangen:~ #**