[systemd-devel] System journal file size problem

David Lambert dave at lambsys.com
Thu Mar 8 06:50:37 PST 2012


Please excuse this repost, but i think the context has changed.

I originally posted this problem as a lack of understanding of the 
documentation for systemd-journald.conf. Now, however, I believe that it 
is a problem where at least some of the limits in systemd-journald.conf 
are being incorrectly handled, resulting in a runaway system.journal file.

Regards,

Dave.


> On 02/29/2012 07:26 AM, Lennart Poettering wrote:
>>
>> You can put limits on the log size however, for example via
>> SystemMaxUse=64M or SystemKeepFree=500M or suchlike.
>
Further experimentation seems to indicate that the first time a limit is 
reached, the system trims the log file back, BUT subsequently it appears 
to ignore all limits:

root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
252K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
256K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
296K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
300K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
68K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal 
<<<<<<<<<<<<<<<<<<journal file trimmed as expected
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
76K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
76K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
88K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
100K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
132K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
140K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
160K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
272K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
288K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
336K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
612K    
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal<<<<<<<<<<<<<<<<journal 
file continues to grow ......
...
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
1.3M    
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal<<<<<<<<<<<<<<<<....and 
grow until all memory is exhausted :(

Configuration file is:

root at argus2:~# cat /etc/systemd/systemd-journald.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
# See system-journald.conf(5) for details

[Journal]
#Compress=yes
#RateLimitInterval=10s
#RateLimitBurst=200
SystemMaxUse=100K
#SystemKeepFree=
SystemMaxFileSize=200K
#SystemMinFileSize=
RuntimeMaxUse=1M
#RuntimeKeepFree=
RuntimeMaxFileSize=300K
#RuntimeMinFileSize=
ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ImportKernel=yes


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120308/e78f7490/attachment.html>


More information about the systemd-devel mailing list