On Mo, 20.08.18 14:08, Frédéric HILPERT (frede...@hilpert.me) wrote:

> Hi,
> 
> I have a question about systemd. Not wanting to create an issue on githbub
> because there are already plenty and this may not be a bug.
> 
> I have a 1GB /var/log/ partition (on a stock Centos 7) and set
> SystemMaxUse=150M in journald configuration. When I restart journald I have
> this message :
> 
> /systemd-journal[53564]: Permanent journal is using 8.0M (max allowed
> 101.4M, trying to leave 152.1M free of 501.0M available → current limit
> 101.4M).//
> /
> Everything looks fine here, but a few days later :
> /
> //MyServer# journalctl --disk-usage //
> //Archived and active journals take up 232.8M on disk.//
> //MyServer# du -sh /var/log/journal///
> //185M    /var/log/journal//
> 
> --> Am I missing something in order to enforce journal not use more than 150
> (or 101.4)MB ?

Currently the journal vacuuming logic wil not remove active journals
but only archived ones. This means that if you have many active
journals (i.e. many different users logging as each user gets one) the
limit may be hit anyway. you can decrease the size each journal can
grow at max, with SystemMaxFileSize=. Note however that making this
size too small also has drawbacks as journalctl coalesces all files it
finds and interleaves them, of which the performance grows with O(n)
with n being the number of files...

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to