Synchronize syslogd with FreeBSD. Primarily syslogd.c/1.129. This primarily
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 9 Aug 2004 20:11:19 +0000 (20:11 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 9 Aug 2004 20:11:19 +0000 (20:11 +0000)
commit82b0e374c8321b6ff69ea34667d19815c650e8bf
tree711539e49383c9eb35fccc67590de27dfb5640ed
parent876b4ffbeec85bb4ed601add8961427f43ec7cef
Synchronize syslogd with FreeBSD.  Primarily syslogd.c/1.129.  This primarily
adds code to avoid fsync()ing the log file line-by-line when further input
from the pipe is pending.

The FreeBSD commit message for 1.129:
 date: 2004/07/04 19:13:58;  author: cperciva;  state: Exp;  lines: +25 -3
 Where syslogd would have fsync()ed a file in the past, instead set a flag
 FFLAG_NEEDSYNC and fsync the file when select() next returns zero.  This
 dramatically speeds up the process of logging large amounts of data, while
 leaving the essential semantics (that data can be expected to be on disk
 if we crash) unchanged.

 In my tests, this speeds up the rc phase of booting by 18-20%. [1]

Suggested-by: Barry Bouwsma
Source: FreeBSD
usr.sbin/syslogd/Makefile
usr.sbin/syslogd/syslog.conf.5
usr.sbin/syslogd/syslogd.8
usr.sbin/syslogd/syslogd.c