[lkml]   [1996]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: syslog spiral death
Matthias Urlichs wrote:
> In, article <>,
> writes:
> >
> > I've seen a similar problem also. Running strace showed that syslogd
> > was doing fsync() quite often. As the log files grow, fsync() takes
> For each line written to the file, to be exact.
> > longer and longer to complete. I don't know whether to consider this
> > an inefficiency in the fsync() implementation or poor behavior on the
> > part of syslogd for calling fsync() so often... We avoid this problem
> > by keeping our log files trimmed (via chklogs).
> >
> We solved the problem by removing the fsync() call from syslogd, installing
> the serial console patch, and logging the crashes (assuming there are any)
> on another system (with an 8-port dumb serial card dedicated to that
> purpose).

This is taken from the syslog.conf man page :

You may prefix each entry with the minus ``-'' sign to
omit syncing the file after every logging. Note that you
might lose information if the system crashes right behind
a write attempt. Nevertheless this might give you back
some performance, especially if you run programs that use
logging in a very verbose manner.

What I do is create a /var/log/everything file that is not synced,
and some files like emerg, crit etc, which are synced. They are
usually smaller, and if your machine crashes, you generally
don't bother about those non-critical logs...


// Alexandre Maret -- Linux : The choice of a GNU generation //
\\ -- \\

 \ /
  Last update: 2005-03-22 13:38    [W:0.063 / U:1.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site