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

From: Vladimir B. Savkin <master@dont-contact.us>
Date: Wed, 9 Jan 2002 16:46:24 +0300

On Tue, Jan 08, 2002 at 11:29:01AM -0700, Duane Wessels wrote:
> On Fri, 28 Dec 2001, Vladimir B. Savkin wrote:
>
> > On Thu, Dec 27, 2001 at 06:02:11PM -0700, Adrian Chadd wrote:
> > > 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).

AFAICS current implementation will perform no socket I/O under
such conditions, so the end result will be the same - dead Squid.

Using poll()able transport for diskd messages would be the clean solution.

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

Does it really matter whan no socket I/O is performed anyway?

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

:wq
                                        With best regards,
                                           Vladimir Savkin.
Received on Thu Jan 10 2002 - 00:21:35 MST

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