Can syslog Performance Be Improved?

2019-03-08 16:53发布

We have an application on Linux that used the syslog mechanism. After a week spent trying to figure out why this application was running slower than expected, we discovered that if we eliminated syslog, and just wrote directly to a log file, performance improved dramatically.

I understand why syslog is slower than direct file writes. But I was wondering: Are there ways to configure syslog to optimize its performance?

7条回答
The star\"
2楼-- · 2019-03-08 17:35

The syslog-async() implementation may help, at the risk of lost log lines / bounded delays at other times. http://thekelleys.org.uk/syslog-async/

Note: 'asynchronous' here refers to queueing log events within your application, and not the asynchronous syslogd output file configuration option that other answers refer to.

查看更多
登录 后发表回答