Hi,
On one of my systems, journald is using over 1 gig of disk space. So I tried to limit it in /etc/systemd/journald.conf like this:
[Journal] #SystemMaxUse=1.0G SystemMaxFileSize=1.0G
However it seems to be ignored. After a
# systemctl restart systemd-journald.service
I see the following:
Dec 31 18:45:01 <hostname> systemd-journal[13137]: Permanent journal is using 1.4G (max 4.0G, leaving 4.0G of free 78.5G, current limit 4.0G). Dec 31 18:45:01 <hostname> systemd-journal[13137]: Journal started
What should I do to limit the journal size?
Thanks for any ideas,
On Tue, Dec 31, 2013 at 08:56:33PM +0100, Heinz Diehl wrote:
On 31.12.2013, Suvayu Ali wrote:
[Journal] #SystemMaxUse=1.0G SystemMaxFileSize=1.0G
I guess you'll have to activate "SystemMaxUse=1.0G" to see the effect you're expecting..
I have tried that too. In fact I tried with both set to 1.0G; no luck.
Hi
On Tue, Dec 31, 2013 at 3:55 PM, Rahul Sundaram wrote:
One more thing: can you try with 1G instead of 1.0G?
Following to my own post:
1G as opposed to 1.0G works. I have filed
https://bugzilla.redhat.com/show_bug.cgi?id=1047568
Rahul
On Tue, Dec 31, 2013 at 04:04:03PM -0500, Rahul Sundaram wrote:
Hi
On Tue, Dec 31, 2013 at 3:55 PM, Rahul Sundaram wrote:
One more thing: can you try with 1G instead of 1.0G?
Following to my own post:
1G as opposed to 1.0G works. I have filed
Thanks! Another interesting bit: if I set both to 1G, journald uses 2G (I think it just adds the two). I would expect it to pick the least among the two.
Although not sure why SystemMaxFileSize is being ignored.
On Dec 31, 2013, at 2:35 PM, Suvayu Ali fatkasuvayu+linux@gmail.com wrote:
Thanks! Another interesting bit: if I set both to 1G, journald uses 2G (I think it just adds the two). I would expect it to pick the least among the two.
Although not sure why SystemMaxFileSize is being ignored.
Sounds like a separate bug. SystemMaxUse= to me means, do not use more than this, in total, for journals. SystemMaxFileSize= to me means, journal files themselves should not grow larger than this.
Interestingly on my system, systemd-journald, with defaults, has created several 16MB journal files, nothing larger. Since they can become corrupt, and systemd-journald detects this and will then create and use a new journal file, it seems like a smaller log size is reasonable. 1G might be a lot of log info to lose if it's irreparably corrupt for whatever reason.
Chris Murphy