Re: logfile writing

From: Robert Collins <robertc@dont-contact.us>
Date: Mon, 17 Jul 2006 09:25:39 +1000

On Mon, 2006-07-17 at 00:15 +0200, Henrik Nordstrom wrote:
> sön 2006-07-16 klockan 21:49 +0800 skrev Adrian Chadd:
>
> > I've written some code to push logfile writing into an external process,
> > freeing up the main squid process from the potentially blocking
> > stdio writes.
>
> Good.
>
> > This code isn't ready to be merged into squid-2.6. Its meant more as a
> > prototype. I haven't even reviewed it for 'correctness' besides running
> > it under a reasonable load (200req/sec) for half a day.
>
> Some comments:
>
> Instead of the linked list of separately maintained buffers, have you
> considered using MemBuf:s?
>
> > * rework the socket IO scheduling code to try and hold onto a buffer until
> > its full or 1 second has passed. It might not really matter but it'll be
> > interesting to profile it at very high (>1500/sec) request rates.
>
> Not sure I agree with this. It should even out anyway under load, and
> under low load it's just annoying to have logs delayed.
>
> > * figure out what to do about rotate (as it stands, this code only re-opens
> > the logfiles and therefore pushes logfile maintainence into an external
> > script.)
>
> You flush any pending buffers first, right?

I did a patch for squid 2.x/early 3.0 that did something similar - and
it suffered from dropped log contents during high load... which is
something I never got *satisfactorily* addressed - its the key thing I
think needs considering.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Received on Sun Jul 16 2006 - 17:26:22 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Aug 01 2006 - 12:00:02 MDT