Re: fsync on large files

Simon Kirby (sim@netnation.com)
Sat, 13 Feb 1999 12:46:52 -0800 (PST)


On Sat, 13 Feb 1999, Alan Curry wrote:

> Simon Kirby writes the following:
> >
> >There's no way in hell I'd run syslogd with fsync() enabled on a machine
> >that longs anything more than 1 line per minute. Disable fsync()ing in
> >syslogd by prepending "-" to each log file you want to turn it off for.
>
> I know that, and I've already done that as a temporary solution. But syslogd
> syncs every line written for a good reason, namely that if the machine
> crashes you don't want to lose the last few lines that were logged. They are
> the most likely place to look for suspicious happenings. So I want a proper
> fix, not a "disable the safety feature" kludge.

Hmm...I have yet to find the fsync()ing useful...I agree that it
could help log something helpful, but I don't see disabling fsync() as a
kludge, though. Perhaps you should try remote logging and disabling
fsync() on the remote machine? If the logging server goes down for
whatever reason, you can enable fsync() again if you want to see if you
can get a better trace of it (it could just be spat to the console
anyhow), but if any other server goes down it should be logged there.

2.2 might help a bit, but I doubt it will do anything significant.
sys_fsync() has changed, but it looks like it just adds some locking.

You might want to try a new init, as version 2.71-2 removed sync() from
the main loop (very helpful).

Simon-

| Simon Kirby | Systems Administration |
| mailto:sim@netnation.com | NetNation Communications |
| http://www.netnation.com/ | Tech: (604) 684-6892 |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/