Bug 72601 - journalctl -b -<boot#>: very slow startup on slow filesystems, large journals
Summary: journalctl -b -<boot#>: very slow startup on slow filesystems, large journals
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-11 15:57 UTC by Alain Kalker
Modified: 2015-05-20 16:58 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Alain Kalker 2013-12-11 15:57:37 UTC
Investigating why a diskless client (booted over NFS) crashed, I noticed that:

$ mount -o nolock,ro <nfs-server>:/nfs/<clientroot> mnt
$ journalctl -b -0 -D mnt/var/log/journal

took almost 6 seconds before showing the log.
The NFS 'server' is a consumer grade router with a hard disk attached to its USB port, resulting in reasonably slow transfer speeds, but which are otherwise acceptable for its intended purpose.

From experience with a few other systems, startup time for journalctl increases as the number of boots recorded and the journal size increases. I believe this may be due to the high number of disk accesses required to find the beginning of entries pertaining to the last boot in the journal.

This bug report is a request for improving the access speed of specific boot journal entries.
Comment 1 Alain Kalker 2013-12-13 17:31:38 UTC
Update: after suffering a graphics driver issue on my main desktop, I noticed that:

$ journalctl -b -1

took almost 40(!) seconds to begin displaying log entries.
(As may be obvious, this machine has rebooted lots of times, and the journal dir takes up quite a lot of disk space.)
Comment 2 Alain Kalker 2013-12-13 17:41:04 UTC
If journalctl is to seriously take on the competition of logrotated syslog, then IMHO fixing this delay should be high priority.

In some cases (the proverbial printer being on fire, but in particular CPUs overheating in a server rack, etc), quick access to the logs is very important.
Comment 3 David Heidelberg (okias) 2014-09-26 09:09:58 UTC
same issue, systemd-215
Comment 5 Lennart Poettering 2015-05-20 16:58:52 UTC
Jan Janssen's patches that improve this have been merged now. Hence closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.