Skip to content

man-db.service slowing boot time. How to delay it so that it starts a couple of minutes after boot?

Results of systemd-analyze blame and systemd-analyze

[pope@dell ~]$ systemd-analyze blame
         35.758s man-db.service
         12.995s systemd-journald.service
          9.171s ufw.service
          8.065s dev-sda1.device
          5.204s nmbd.service
          2.972s NetworkManager.service
          2.494s accounts-daemon.service
          2.473s systemd-udevd.service
          2.162s systemd-journal-flush.service
          1.943s systemd-fsck@dev-disk-by\x2duuid-dbb3fcea\x2d88d3\x2d47d8\x2da0
          1.799s polkit.service
          1.346s logrotate.service
          1.301s systemd-user-sessions.service
          1.253s bluetooth.service
          1.202s smbd.service
          1.148s shadow.service
          1.113s wpa_supplicant.service
          1.057s systemd-backlight@leds:dell::kbd_backlight.service
          1.004s gdm.service
           932ms dnsmasq.service
           771ms systemd-tmpfiles-setup-dev.service
           737ms user@120.service
           607ms systemd-modules-load.service

and

[pope@dell ~]$ systemd-analyze
Startup finished in 3.151s (kernel) + 55.312s (userspace) = 58.464s

How do I delay man-db.service so that it doesn't slow down boot and only starts after the desktop appears(say, in 2-3 minutes after boot)?

Edited 8 Feb 2016. We only hold this version.

1 points6 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
1 · 100% up
Kind
Text
ID
44pp2u

Author

3
posts
6
comments
0
media
View profile

6 comments

I'm not sure it actually blocks the boot process. Check

$ systemd-analyze plot > plot.svg

and

$ systemd-analyze critical-chain

and see if it runs in parallel with other processes. If that's the case then there's nothing wrong with 58s boot time.

I don't use gdm in my setup and man-db runs in the background as the desktop starts. I think. could be wrong tho

In any case man-db is started by man-db.timer which you can tweak if you want to.

From systemd.timer man:

Example: "OnBootSec=5h 30min" means 5 hours and 30 minutes after boot-up.

4 points

Does setting OnBootSec= to say, 120 seconds help? In systemd-analyze plot > plot.svg, man-db.service does run parallel to other processes. But of all the processes listed in systemd-analyze blame, user@120.service finishes second last to man-db.service around 31 seconds mark. man-db.service finishes last at 58 second. There are a few other processes which ran parallel to man-db.service but they are not in the systemd-analyze blame list. In this case too, man-db.service takes 6 seconds more than second last process dnscrypt-proxy.service.

EDIT: Totally missed your edit. Didn't reload the page. I will try it out.

1 points

You see, if it's not blocking the boot process there's nothing bad with man-db finishing after 58 seconds. It's just a background task that doesn't actually define your boot time. You could put something like sleep 12d on a start up timer and it'll say your boot time was 12 days. See what i'm getting at?

Granted, if the system's running on non-SSD drive man-db could slow down the boot process slightly due to IO but i doubt it's any significant.

3 points

I had the same problem. I went around it by disabling the service. Now, I just run mandb after each time I update my system.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.