Re: syslog-ng to replace syslogd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 22, 2004 at 10:12:00PM +1000, Russell Coker wrote:

> In most cases synchronous writes for logs just reduces performance for no 
> benefit.

(I didn't check whether it does this already.)  Wouldn't it be possible
to speed up synchronous syslogging with something like this:

	while (1) {
		logbuf = blocking_read(syslog_socket);
		while (space_left(logbuf) && data_available(syslog_socket))
			logbuf .= nonblocking_read(syslog_socket);

		write_to_log_files(logbuf);
	}

That way, if you get a burst of log messages, the first sync write
would write out just a single line, and all the next writes would
write out everything that accumulated in the buffer so far in one
single sync write.

That way, you still get sync behaviour, but without the
whole-disk-roundtrip-per-log-line overhead.

Just a thought.


cheers,
Lennert



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux