Re: [PATCH} avoid busy-wait on diskd overload

From: Duane Wessels <wessels@dont-contact.us>
Date: Tue, 8 Jan 2002 11:29:01 -0700 (MST)

On Fri, 28 Dec 2001, Vladimir B. Savkin wrote:

> On Thu, Dec 27, 2001 at 06:02:11PM -0700, Adrian Chadd wrote:
> > On Sat, Dec 08, 2001, Vladimir B. Savkin wrote:
> > > Hello!
> > >
> > > The following patch against 2.5-HEAD prevents squid from entering
> > > busy-wait state on diskd queue overflow. It is accomplished by using
> > > blocking msgrcv call.
> >
> > Hmm. I don't know .. I'm really against any more blocking IO code
> > in diskd - i don't mind it being slow and missing objects, but I
> > do mind it starting to stall at high load.
>
> But it does anyway, and blocking IO call is much saner than busy-loop.

There are two problems with blocking on msgrcv().

First, there is no timeout for this system call. It may never
return (due to OS bugs, exiting diskd process, whatever).

Second, the "busy-loop" allows Squid to read messages on
ALL diskd message queues, not just a single one.

I think the exponential backoff in the "busy-loop" is
a decent compromise.

Duane W.
Received on Tue Jan 08 2002 - 11:29:02 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:45 MST