• Disabling systemd-journal-flush.service


    excuse me, Is it safe to disable or mask systemd-journal-flush.service? It takes around 30% of my booting time, what exactly that service is?

    I cannot find anyting about disabling that service. Is it related to systemd-journald.service?

    Thank you.

    Here is my systemd-analyze blame output.

    8.005s systemd-journal-flush.service
    6.647s dev-sda8.device
    2.924s systemd-journald.service
    1.893s boot-efi.mount
    1.500s upower.service
    1.461s alsa-restore.service
    1.431s polkit.service
    1.427s bluetooth.service
    1.377s systemd-udevd.service
    1.317s systemd-tmpfiles-setup-dev.service
    1.314s NetworkManager.service
     838ms systemd-modules-load.service
     666ms dev-disk-by\x2duuid-0c883b7b\x2dffe5\x2d4dd6\x2daaa4\x2dba64a2c
     617ms systemd-rfkill.service
     606ms [email protected]:intel_backlight.service
     584ms systemd-binfmt.service
     569ms home.mount
     532ms systemd-tmpfiles-setup.service
     489ms wpa_supplicant.service
     452ms dev-hugepages.mount
     450ms dev-mqueue.mount
     392ms avahi-daemon.service
     381ms systemd-logind.service
    

    Boot time:

    Startup finished in 7.734s (firmware) + 2.283s (loader) + 3.533s (kernel) + 16.780s (userspace) = 30.331s
    
  • Hi!

    That is required to flush old logs. You can disable it, but what I’d recommend you is change the vacuum time:

    sudo journalctl --vacuum-time=5d

    will delete all logs but retain the last 5 days logs. This way your system never will be sluggish because of the big sized logs.

    You’ll notice that a lot of space is freed.

    Tell us if it helps.

    Oh, you can also setup the the journald, the config file /etc/systemd/journald.conf has some configuration fields:

    #SystemMaxUse=
    #SystemKeepFree=
    #SystemMaxFileSize=

    Check man journald.conf for more info.

    Cheers!

    P.S. Which filesystem are you using?

    P.S.2 More info: http://unix.stackexchange.com/questions/139513/how-to-clear-journalctl

  • After I run journalctl --vacuum-time=5d the booting time decreased by 2 sec. It clean 3GB of log file, (wow that is so big for a log.)

    Thank you, that was helpful information.
    The booting time of flush is decreased but the systemd-journald is increased. I guess I’ll just let the service enabled. I don’t want to experience an error, it doesn’t look like disabling the flush save significant time.
    I’m using ext4 btw.

    here is the boot time now:

    # systemd-analyze
    Startup finished in 7.503s (firmware) + 2.228s (loader) + 3.454s (kernel) + 15.675s (userspace) = 28.861s
    # systemd-analyze blame
     6.109s systemd-journald.service
     5.888s dev-sda8.device
     2.485s systemd-journal-flush.service
     1.993s systemd-logind.service
     1.991s alsa-restore.service
     1.938s avahi-daemon.service
     1.937s bluetooth.service
     1.592s boot-efi.mount
     1.558s systemd-tmpfiles-setup-dev.service
     1.421s systemd-udevd.service
     1.197s NetworkManager.service
     1.131s home.mount
      995ms polkit.service
      909ms systemd-modules-load.service
      827ms systemd-timesyncd.service
      814ms wpa_supplicant.service
      654ms systemd-rfkill.service
      651ms systemd-tmpfiles-setup.service
      620ms dev-disk-by\x2duuid-0c883b7b\x2dffe5\x2d4dd6\x2daaa4\x2dba64a2c
      513ms systemd-sysctl.service
      490ms upower.service
      446ms systemd-udev-trigger.service
      381ms [email protected]
    
service6 systemd23 booting17 Posts 3Views 339
Log in to reply