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).

This article was posted by Matty on 2009-01-10 22:30:00 -0400 -0400