Bug 1029604

Summary: Boot takes 27 seconds longer with /var/log/journal than without
Product: Red Hat Enterprise Linux 7 Reporter: Karel Volný <kvolny>
Component: systemdAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Sklenar <psklenar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: lnykryn, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-207-9.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1006386 Environment:
Last Closed: 2014-06-13 11:19:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1006386    
Bug Blocks:    

Description Karel Volný 2013-11-12 17:28:06 UTC
I believe this one affects RHEL7 too - judging from bug #1006386 comment #29 I believe this is systemd-journald design flaw

I managed to break my testing installation (beyond my ability to repair, bug #1029527) so I cannot provide exact numbers now, but if I recall correctly, the boot took 20 - 25 seconds with several services blamed to take more than ten or twelve seconds

after doing a fresh install, the machine booted in 12.5 seconds

the testing procedure consisted of writing random things to logs for some tenths of hours (with pauses in between to workaround rate limiting and to become a bit closer to the real world example where I saw this problem on Fedora)

note that simply "mkdir /var/log/journal ; reboot" is enough to get data written to it, systemd-journald runs by default

also note that these numbers are from a virtual machine run on a host with SSD and plenty of RAM, real hardware could be much slower (if I get it right that it accesses many 4 KiB blocks on disk)

+++ This bug was initially created as a clone of Bug #1006386 +++

Comment 2 Lukáš Nykrýn 2013-12-10 14:20:22 UTC
Following patches were backported to rhel7 systemd repo, will be in next update.

fbb6341	journald: mention how long we needed to flush to /var in the logs	    performance
eda4b58	journal: simplify pre-allocation logic	    performance
248c78c	journal: allow journal_file_copy_entry() to work on non-local files	    performance
e5462cd	journal: fix iteration when we go backwards from the beginning of an array chain element	    performance
f268980	journal: optimize bisection logic a bit by caching the last position	    performance
a676e66	journal: when appending to journal file, allocate larger blocks at once	    performance

Comment 5 Ludek Smid 2014-06-13 11:19:53 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.