<div dir="ltr"><div>Hello,</div><div><br></div><div>I have noticed that sometimes log messages are dropped in one of my systemd-based system (systemd 219).</div><div><br></div><div>Apps log through syslog (/dev/log). rsyslogd listens at /run/systemd/journal/syslog</div><div><br></div><div>I decided to compare the logging performance (using loggen tool: <a href="https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/administration-guide/87">https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/administration-guide/87</a> ) in two cases:</div><div><br></div><div>1. If it logs to /dev/log</div><div>2. If it logs to  /run/systemd/journal/syslog</div><div><br></div><div>All the setup was the same. I can share the script I used to test if needed but the idea was pretty simple - for every tested logging rate, log for 5 minute. Then count number of lines in the log and compare it with the number of lines sent by loggen tool.</div><div><br></div><div>I expected certain degradation as promised by rsyslog manual: ("It must be noted, however, that the journal tends to drop messages when it becomes busy instead of forwarding them to the system log socket. This is because the journal uses an<br>async log socket interface for forwarding instead of the traditional synchronous one").</div><div><br></div><div>However I was shocked by the results. <br></div><div><br></div><div>Max rate at which log messages are NOT dropped is 17250 msg/s for logging to /run/systemd/journal/syslog.  And only 47 messages per second for logging to /dev/log.</div><div><br></div><div>Example of the loggen cmdline:</div><div><br></div><div>./loggen --unix -D --interval 300 --rate 35 --size 512 /dev/log</div><div><br></div><div>journald.conf:</div><div><br>[Journal]<br>#<br># Configuration in order to send logs to rsyslog<br>#<br>Storage=none<br>#Storage=auto<br>ForwardToSyslog=yes<br>MaxLevelSyslog=debug<br>#<br># These configurations are if the storage is set to auto<br># this is just configured in order to limit the log size<br>#<br>SystemMaxUse=400M<br>SystemKeepFree=200M<br>SystemMaxFileSize=20M<br>RuntimeMaxUse=1000M<br>RuntimeKeepFree=1000M<br>RuntimeMaxFileSize=100M<br>MaxRetentionSec=1month<br>MaxFileSec=1week</div><div><br></div><div></div><div>(I have checked with "journalctl -f" that logs are not stored in the binary journal)</div><div><br></div><div>I was shocked by the results. My first idea was that there is something with buffers not being flushed somewhere in the chain at the end of the test. <br></div><div><br></div><div>But I can see that last messages in the log are the last messages sent by loggen tool.  It looks unbelievably bad. <br></div><div><br></div><div>Do I measure something wrong? Or is there any known setting I have to apply to journald to make forwarding more efficient?</div><div><br></div><div>Any ideas are appreciated. <br></div><div><br></div><div></div><div>Thank you in advance!<br></div><div></div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">WBR & WBW, Vitaly</div></div></div></div>