Discussion:
How to make journald increase logs storage capacity?
(too old to reply)
4xy
2018-01-20 17:28:21 UTC
Permalink
I have limit in 4Gb for journald regardless of the settings I've made. I
see this line in the manual

|$ sudo systemctl status systemd-journald ... jan 20 15:44:26 host
systemd-journald[1218]: System journal (/var/log/journal/) is 4.5G, max
4.0G, 0B free. jan 20 15:44:26 host systemd-journald[1218]: Journal started|

I see this line in the manual.
The first pair defaults to 10% and the second to 15% of the size of the respective file system, but
each value is capped to 4G.

I have about 1Gb logs per day. I would like to have ability to keep them
about 3 months.

https://stackoverflow.com/questions/48358430/how-to-make-journald-increase-logs-storage-capacity
Jameson Graef Rollins
2018-01-20 18:02:03 UTC
Permalink
Post by 4xy
I have limit in 4Gb for journald regardless of the settings I've made. I
see this line in the manual
|$ sudo systemctl status systemd-journald ... jan 20 15:44:26 host
systemd-journald[1218]: System journal (/var/log/journal/) is 4.5G, max
4.0G, 0B free. jan 20 15:44:26 host systemd-journald[1218]: Journal started|
I see this line in the manual.
The first pair defaults to 10% and the second to 15% of the size of the respective file system, but
each value is capped to 4G.
I have about 1Gb logs per day. I would like to have ability to keep them
about 3 months.
https://stackoverflow.com/questions/48358430/how-to-make-journald-increase-logs-storage-capacity
I'm very interested in the answer to this question. I did not realize
there was a hard limit on the amount of logs that journald can support.
I have a project where we need to indefinitely store logs being produced
at a rate of many Mb per day. A 4Gb limit would definitely be
problematic.

Is there actually a hard limit? Why? Can it be circumvented?

Thank you very much for the information.

jamie.
Mantas Mikulėnas
2018-01-20 19:00:57 UTC
Permalink
No, the cap is applied to the described _default_ values only, not to the
ones you configure.

Journal limits are additive; that is, logs are only kept as long as they
satisfy *all* limits, both time and space.

So if you want to keep a large amount of logs, the first thing to do is
raise SystemMaxUse=.

Jan 20 20:53:44 radius systemd-journald[11847]: System journal
(/var/log/journal/09c69409749a4
) is 4.0G, max 16.0G, 11.9G free.

On Sat, Jan 20, 2018, 20:12 Jameson Graef Rollins <
Post by 4xy
Post by 4xy
I have limit in 4Gb for journald regardless of the settings I've made. I
see this line in the manual
|$ sudo systemctl status systemd-journald ... jan 20 15:44:26 host
systemd-journald[1218]: System journal (/var/log/journal/) is 4.5G, max
4.0G, 0B free. jan 20 15:44:26 host systemd-journald[1218]: Journal
started|
Post by 4xy
I see this line in the manual.
The first pair defaults to 10% and the second to 15% of the size of
the respective file system, but
Post by 4xy
each value is capped to 4G.
I have about 1Gb logs per day. I would like to have ability to keep them
about 3 months.
https://stackoverflow.com/questions/48358430/how-to-make-journald-increase-logs-storage-capacity
I'm very interested in the answer to this question. I did not realize
there was a hard limit on the amount of logs that journald can support.
I have a project where we need to indefinitely store logs being produced
at a rate of many Mb per day. A 4Gb limit would definitely be
problematic.
Is there actually a hard limit? Why? Can it be circumvented?
Thank you very much for the information.
jamie.
_______________________________________________
systemd-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
Mantas Mikulėnas <***@gmail.com>
Sent from my phone
v***@pengaru.com
2018-01-20 19:11:47 UTC
Permalink
I have limit in 4Gb for journald regardless of the settings I've made. I see
this line in the manual
|$ sudo systemctl status systemd-journald ... jan 20 15:44:26 host
systemd-journald[1218]: System journal (/var/log/journal/) is 4.5G, max
4.0G, 0B free. jan 20 15:44:26 host systemd-journald[1218]: Journal started|
I see this line in the manual.
The first pair defaults to 10% and the second to 15% of the size of the
respective file system, but
each value is capped to 4G.
This is referencing the defaults configured automatically, they're first
computed as a %age, confined to 4G. The wording of that sentence could
probably be improved in the documentaiton.
I have about 1Gb logs per day. I would like to have ability to keep them
about 3 months.
It sounds like you want to keep around 100G of logs:

SystemMaxUse=100G


Note that performance of commands like `journalctl` and even `systemctl
status $unit` drops significantly with large numbers of journals.
As a consequence, you may want to increase the maximum size of the
individual journal files so there are fewer of them:

SystemMaxFileSize=10G

Something like that...

Regards,
Vito Caputo

Loading...