man: add note about journald forwarding being sync

This footgun should at least be documented, if there's not going
to be a shortcut setting to establish the async `journalctl
--follow` equivalent.

Fixes: https://github.com/systemd/systemd/issues/2815
This commit is contained in:
Vito Caputo
2023-11-17 12:30:32 -08:00
committed by Luca Boccassi
parent 42c50fdf31
commit 165fb931ea

View File

@@ -386,6 +386,15 @@
the log buffer, for example by adding <literal>log_buf_len=8M</literal> to the kernel command line.
<command>systemd</command> will automatically disable kernel's rate-limiting applied to userspace
processes (equivalent to setting <literal>printk.devkmsg=on</literal>).</para></listitem>
<para>Note: Forwarding is performed synchronously within journald, and may significantly affect its
performance. This is particularly relevant when using ForwardToConsole=yes in cloud environments,
where the console is often a slow, virtual serial port. Since journald is implemented as a
conventional single-process daemon, forwarding to a completely hung console will block journald.
This can have a cascading effect resulting in any services synchronously logging to the blocked
journal also becoming blocked. Unless actively debugging/developing something, it's generally
preferable to setup a <command>journalctl --follow</command> style service redirected to the
console, instead of ForwardToConsole=yes, for production use.</para>
</varlistentry>
<varlistentry>