Re: syslog() blocks on glibc 2.1.3 with kernel 2.2.x

From: Ricky Beam (jfbeam@bluetopia.net)
Date: Mon Oct 23 2000 - 17:10:42 EST


On 23 Oct 2000, Patrick J. LoPresti wrote:
>Once the name resolution times out, you might expect things to become
>unstuck. But they don't.

Negative. Things have been queued. The deadlock will only go away if the
very next message processed is the named local message. And then it would
have to process a few more local messages so it wouldn't stall again so soon.

>> Per chance are you running the name service caching daemon (nscd)?
>
>No.

Please do. That will reduce the ammount of traffic to the name server.

>> I'd also guess you aren't disabling fsync() for your sysylog files
>> (it's part of the syslog.conf format) -- this is a conciderable
>> drain on syslogd.
>
>I see no documentation for such an option in the syslog.conf man page.
>This is with the current Red Hat 6.2 syslogd (package
>sysklogd-1.3.31-17).

It's in the syslogd and syslog.conf man page (sysklogd-1.3.31-16):
(syslog.conf)
   Regular File
       Typically messages are logged to real files. The file has
       to be specified with full pathname, beginning with a slash
       ``/''.

       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.

--Ricky

PS: as a side note, you can/will lose information even if sync is enabled.
    (fsync() will not flush metadata so the file is truncated on restart.)

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



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:22 EST