[systemd-devel] Slow startup of systemd-journal on BTRFS
Kai Krakow
hurikhan77 at gmail.com
Sat Jun 14 14:37:04 PDT 2014
Goffredo Baroncelli <kreijack at libero.it> schrieb:
> On 06/14/2014 10:13 PM, Kai Krakow wrote:
>> Take care to enable all needed services to enable defrag... If your
>> services make use of journal file loading these files should also become
>> part of the process. You can check with
>> "/usr/lib/systemd/systemd-readahead analyze". The state is stored in
>> /.readahead.
>>
> I have enabled all the services (collect, replay, done), but I was unable
> to see any gain.
I don't think you can actually enable the "done" service because it is
static... But if it placed a symlink in /etc/systemd that is probably wrong
and you should undo it. It is automatically activated a few seconds after
booting is done to store the collected data for replaying on next reboot.
Check with "find /etc/systemd -name '*readahead*' -type l"...
> I don't know why but system.journal is not considered by readahead:
>
> # /usr/lib/systemd/systemd-readahead analyze | grep journal
>
>
> 100% ( 1) 770: /etc/systemd/journald.conf
> 50% ( 1) 4194304:
> /var/log/journal/36f10f5379ec4a1398ac303a0ce20fd0/user-997.journal
> 50% ( 1) 4194304:
> /var/log/journal/36f10f5379ec4a1398ac303a0ce20fd0/user-1000.journal
I tried that on my system and it looks vice-versa somehow:
$ sudo /usr/lib/systemd/systemd-readahead analyze|fgrep journal
100% ( 1) 812: /etc/systemd/journald.conf
100% ( 1) 8388608:
/var/log/journal/121b87ca633e8ac0016656680000001b/system.journal
Strange... ;-)
To get back to your performance problem: Did you try "systemctl enable
bootchart" and then (after a reboot) look at the png generated in /run/log
(at least in my system it is placed there, look at the configs if in doubt).
It can give some interesting clues about why a service starts late or takes
long to execute.
--
Replies to list only preferred.
More information about the systemd-devel
mailing list