Re: squid-users-digest Digest V97 #62

From: Michael O'Reilly <michael@dont-contact.us>
Date: Tue, 18 Mar 1997 18:17:56 +0800

In message <199703181012.MAA06926@zibbi.mikom.csir.co.za>, John Hay writes:
> >
> > I had exactly the same problems with the redirector. I lifted it to
> > the maximum of 32 processes, and it was still queuing requests. The
> > redirector processes were simple perl scripts of the form..
> > $| = 1;
        ^^^^^^^

> > while (<>) { s/xxxx/yyyy/; print }
> >
> > and doing an strace on them confirmed that they were NOT doing
> > blocking I/O, that the only system calls the script was doing was
> > read(...);
> > write(...);
> > and the the read - write gap was < 1ms. (i.e. immediate turn
> > around). Squid however was still frequently using all 32 of them!
> >
>
> By default perl use buffered io, maybe setting it to unbuffer will help.
> Something like "select(STDOUT); $| = 1;" should do it.

That's already being done. The strace(8) confirmed that it was
definately not being buffered, and that the turnaround time from the
perl program reading the line to the perl program writing the line was
consistently less than 1 millisecond.

Michael.
Received on Tue Mar 18 1997 - 02:27:14 MST

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