Disabling synchronous syslogd updates

Most *NIX implementations ship with a syslog daemon, which is responsible for reading messages from clients and writing these messages to one or more log destinations. Most daemons perform this operation synchronously using the fsync() system call, which can lead to some headaches on super busy log servers. Linux has a nifty option to disable synchronous updates, which can really aide in scaling logging servers to handle lots and lots of clients. To disable synchronous updates (this can result in data loss, so make sure to evaluate all options prior to using this feature), you can prefix the log destination with a hyphen like so:

$ grep daemon /etc/syslog.conf
daemon.* -/var/log/messages

This is super useful, and I wish there was a similar feature available out of the box for Solaris (syslog-ng can do this, but you shouldn’t have to install another syslog daemon to get this functionality IMHO).

1 thought on “Disabling synchronous syslogd updates”

Leave a Reply

Your email address will not be published. Required fields are marked *