Advice please on slow boot process

I had noticed my TW boot had slowed down on my dekstop PC recently so decided to run systemd-analyze blame and it showed

34.145s systemd-journal-flush.service

which is the longest process by far. Running journalctl --disk-usage shows

Archived and active journals take up 904.0M on disk.

So any suggestions as to how to improve this please?

Stuart

‘man journald.conf’ is your friend. You can limit the size of individual journal files size as well as the overall available storage. That should help here. For example, limit the overall storage by editing ‘SystemMaxUse=’ in /etc/systemd/journald.conf like this

SystemMaxUse=100M

I tried setting that in my case to 300M but to no avail, it has not reduced the overall size and it is still at 904M. Is there a correct way to get the overall size reduced, say by running a command, as simply re-booting with a change to the settings has not made any difference.

Stuart

You could remove and recreate /var/log/journal manually (as root) if desired, then restart systemd-journald.service

What is currently reported by the following?

ls -l /var/log/journal

I did try reducing the max to 100 but the boot was slightly quicker with the flush only taking 25secs this time but the storage went up to 912M! I’ll try your suggestion.

The output of that command after the last boot is

ls -l /var/log/journal
total 0
drwxr-sr-x+ 1 root systemd-journal 2474 Aug 26 20:07 38bb44e0747c9a5dfa56c408571537d5

ls -l /var/log/journal/38bb44e0747c9a5dfa56c408571537d5
total 933888
-rw-r-----+ 1 root systemd-journal  16777216 May 13 20:26 system@000532be3ec98eec-7910e4ab128c05c9.journal~
-rw-r-----+ 1 root systemd-journal   8388608 May 13 20:28 system@000532be46f960cd-a8d843dec94afca3.journal~
-rw-r-----+ 1 root systemd-journal   8388608 May 13 22:34 system@000532c00ba0055a-415db3fa77b262e7.journal~
-rw-r-----+ 1 root systemd-journal  92274688 May 31 16:42 system@00053425390a1fa4-6de1d4dc75721a05.journal~
-rw-r-----+ 1 root systemd-journal  33554432 Jun  6 07:18 system@000534960a944d54-ae978bc7a209838a.journal~
-rw-r-----+ 1 root systemd-journal  50331648 Aug 26 20:07 system@00053afe3921736b-0fa56214634ca60e.journal~
-rw-r-----  1 root systemd-journal 117440512 May 12 17:43 system@44b8aca4772a4999ad34b6cc004ff57d-0000000000000001-000531223576c15f.journal
-rw-r-----+ 1 root systemd-journal  33554432 Jun 18 17:36 system@f03425391d184630a4806974bb15add5-0000000000000001-00053496096e1ed3.journal
-rw-r-----+ 1 root systemd-journal 109051904 Jul  2 18:29 system@f03425391d184630a4806974bb15add5-0000000000033030-0005359012544658.journal
-rw-r-----+ 1 root systemd-journal 117440512 Jul 25 18:08 system@f03425391d184630a4806974bb15add5-0000000000055b97-000536aa71c956dd.journal
-rw-r-----+ 1 root systemd-journal 117440512 Aug 15 20:30 system@f03425391d184630a4806974bb15add5-000000000007debd-00053878d6e8c990.journal
-rw-r-----+ 1 root systemd-journal  16777216 Aug 16 21:46 system@f03425391d184630a4806974bb15add5-00000000000a62c3-00053a2145b52fa3.journal
-rw-r-----+ 1 root systemd-journal 109051904 Sep 10 09:57 system.journal
-rw-r-x---+ 1 root systemd-journal  16777216 May 13 20:28 user-1000@000532be4833b28e-d05645ca3662d141.journal~
-rw-r-----+ 1 root systemd-journal   8388608 May 18 09:22 user-1000@000533198dcbae38-2f5ace98af258a37.journal~
-rw-r-x---+ 1 root systemd-journal  16777216 Jul 17 07:10 user-1000@000537ceb54cc888-62a91991c3ee838c.journal~
-rw-r-x---+ 1 root systemd-journal  16777216 Jun 18 17:36 user-1000@0b5b6ef980ab4b909a994dd3a0c978b8-0000000000009aca-000533198dd75ec3.journal
-rw-r-x---+ 1 root systemd-journal  16777216 Jul  2 18:29 user-1000@0b5b6ef980ab4b909a994dd3a0c978b8-000000000003302e-00053590125444ca.journal
-rw-r-x---+ 1 root systemd-journal  25165824 Aug 16 21:46 user-1000@0d58bc70f7b3456abc740497a365e15e-000000000006e592-000537ceb567def7.journal
-rw-r-x---+ 1 root systemd-journal  16777216 Sep 10 09:57 user-1000.journal
-rw-r-x---+ 1 root systemd-journal   8388608 Apr 29 09:59 user-65534.journal

Stuart

Edit: Just tried deleting and recreating the /var/log/journal and restart the service. Now only using 8M but it is till showing the max possible use as 4G, I thought that conf change would limit the max use?

Post your /etc/systemd/journald.conf

Here it is


#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.

[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitInterval=30s
#RateLimitBurst=1000
#SystemMaxUse=100M
#SystemKeepFree=
#SystemMaxFileSize=
#SystemMaxFiles=100
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#RuntimeMaxFiles=100
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/tty10
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg

Only thing I have changed since install was the SystemMaxUse value.

Stuart

No, you didn’t uncomment it :wink:

It needs to be

SystemMaxUse=100M

DOH!!! Yet another senior moment! Really must get my eyes tested and my brain in gear! :’(

Stuart

LOL! Yes, sometimes its the simplest things that we manage to overlook!

Dup your TW again, the culprit to the slow booting was in the ntp package, it has been fixed.

My booting was also slowed up by the recent ntp daemon problems which are now resolved.

Stuart