Re: Question regarding configuration of SystemMaxUse and SystemKeepFree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
thanks for your fast response, Andrei! It seems like i was a bit unclear with my explanation, so we misunderstood. Sorry for that.

I meant the actual size of the filesystem, which differs from e.g. 100M on a small SoC up to ~8G on a bigger server system. Not a specific service, which is creating too much log entries, which i need to cap.

The problem is, that due to that differences between all machines, it doesnt make much sense to set the same absolute value on all machines. I may need to say, that i am not configuring all that machines by hand - i am managing all that machines with Ansible and i am trying to configure them as homogeneous as possible.

Actually, i want to set a relative value for SystemMaxUse and/or SystemKeepFree in the journald configuration. So saying for example - no matter how much space the filesystem behind /var/log provides, you can use up to 60% of it.

The documentation states, that there are relative values used per default, but they are capped (as you mentioned) at a specific value. So for me, it looks like journald is also supporting relative values.

So i am wondering about the fact, that journald.conf is allowing only absolute values like e.g. SystemMaxUse=1G and not SystemMaxUse=60%.

I am actually unsure, whether journald is really not supporting relative values for the mentioned configuration directives, or whether i am just configuring it wrong?


Best regards
Karl

Am 02.09.23 um 07:17 schrieb Andrei Borzenkov:
On 02.09.2023 00:29, PureLinux Betriebsführung wrote:
Hi,
i am running a bunch of partly very different systems with Debian
Bookworm. On this machines, i am using systemd 252 (252.12-1~deb12u1).

If i am configuring journald, i am facing the problem, that /var/log is
having a very different size on all my machines. From 100M to 8G or
something.


Documentation states that te default limit is capped at 4G. If you really have 8G of journal files, you probably need to investigate why.

Journald states, that the configuration options SystemMaxUse and
SystemKeepFree cannot be a relative, percentual value. But they are
percentual values by default.

If i want to set a percentual value, journald only returns
"/etc/systemd/journald.conf:25: Failed to parse size value, ignoring: 20%"

So my question is - is there any option to set a relative value/a
percentage for that values?

Pragmatic answer - service that creates drop-in for journald.conf. It can run every time and drop into /run or just once and drop into /etc.

Per default, it seems to be possible. So why
not a user defined percentage?




Attachment: OpenPGP_0x08EAA736C348F670.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux