[Linux-HA] Death of my servers!
alanr at unix.sh
Fri Mar 12 14:52:12 MST 2004
Lars Marowsky-Bree wrote:
> On 2004-03-12T15:47:26,
> Chris Friesen <cfriesen at nortelnetworks.com> said:
>>We actually modified syslog to do all the file writes from a child, with
>>a queue between the parent and child. This way the parent never blocks.
>> The downside is that you could potentially drop messages if the child
>>blocks for too long.
> We are working on this for heartbeat too, double-buffering the log
> messages in a ring buffer. Should be straightforward, we use our own
> logging library anyway...
Is this different from the code I put in CVS?
I don't think I would have described it that way. I would have described
it *much* more simply than that (and that worries me).
If you just write to the child process using the IPC code - then let the
child process block if it wants/needs to. Set the size of the of IPC
output Q to 20 or something. That will handle anything likely to ever
occur - since heartbeat doesn't log *that* much. I suppose maybe setting
it to 100 would be good for running with debugging on. Also increase the
input queue on the child process side. But, it only consumes those buffers
when the process is blocked, and the kernel backs up flow control. So, in
reality it's probably at least 30 or so more than that.
Alan Robertson <alanr at unix.sh>
"Openness is the foundation and preservative of friendship... Let me claim
from you at all times your undisguised opinions." - William Wilberforce
More information about the Linux-HA