Re: [squid-users] Re: can squid load data into cache faster than sending it out?

From: Dave Dykstra <dwd_at_fnal.gov>
Date: Fri, 6 May 2011 15:54:24 -0500

Ah, but as explained here
    http://www.squid-cache.org/mail-archive/squid-users/200903/0509.html
this does risk using up a lot of memory because squid keeps all of the
read-ahead data in memory. I don't see a reason why it couldn't instead
write it all out to the disk cache as normal and then read it back from
there as needed. Is there some way to do that currently? If not,
perhaps I'll just submit a ticket as a feature request. I *think* that
under normal circumstances in my application squid won't run out of
memory, but I'll see after running it in production for a while.

- Dave

On Wed, May 04, 2011 at 02:52:12PM -0500, Dave Dykstra wrote:
> I found the answer: set "read_ahead_gap" to a buffer larger than the
> largest data chunk I transfer.
>
> - Dave
>
> On Wed, May 04, 2011 at 09:11:59AM -0500, Dave Dykstra wrote:
> > I have a reverse proxy squid on the same machine as my origin server.
> > Sometimes queries from squid are sent around the world and can be very
> > slow, for example today there is one client taking 40 minutes to
> > transfer 46MB. When the data is being transferred from the origin
> > server, the connection between squid and the origin server is tied up
> > for the entire 40 minutes, leaving it unavailable for other work
> > (there's only a small number of connections allowed by the origin server
> > to its upstream database). My question is, can squid be configured to
> > take in the data from the origin server as fast as it can and cache it,
> > and then send out the data to the client as bandwidth allows? I would
> > want it to stream to the client during this process too, but not block
> > the transfer from origin server to squid if the client is slow.
> >
> > I'm using squid-2.7STABLE9, and possibly relevant non-default squid.conf
> > options I'm using are:
> > http_port 8000 accel defaultsite=127.0.0.1:8080
> > cache_peer 127.0.0.1 parent 8080 0 no-query originserver
> > collapsed_forwarding on
> >
> > - Dave
Received on Fri May 06 2011 - 20:54:26 MDT

This archive was generated by hypermail 2.2.0 : Sat May 07 2011 - 12:00:02 MDT