> Weibin Yao wrote:
> > I'am using squid-2.7. I has checked the configure reference and found
> > nothing about sendfile(). Why squid does not support sendfile()?
> > especially the HIT request.
On 26.01.10 21:26, Amos Jeffries wrote:
> 1) Blocking call. Squid needs to support more than one client request
> simutaneously.
is it blocking anywhere?
> 2) speed. sendfile is limited linearly by disk IO speeds, blocking the
> entire time.
does it matter for content fetched from disk? I think that sendfile is for
this cases the most effective option (e.g. from disk direct to network card
memory). I understand it can be an issue in 3.x where squid wants to
implement own caching, but wonder if sendfile couldn't help here as you
indicate.
> 3) HTTP protocol. The current design of Squid stores the headers and
> data together. They cannot be altered correctly according to protocol
> requirements during a sendfile() call.
you can read, process and write headers and THEN call sendfile for the rest
of content. The problem is with chunking which it not supported on client
connections yet, iirc.
> 4) collapsed forwarding. multiple clients may be receiving the same
> identical object from Squid simultaneously, or even different parts of
> the same object.
should not be a problem with sendfile, should it?
> 4) object location. not all HIT objects are from files. some may be in
> memory, or a range of something partially received by another client.
5) I think ;-)
Yes sendfile is only applicable on content fetched from the disk.
Apparently nobody implemented sendfile in squid yet and apparently nobody
will do it, but I wonder if all those reasons are really that problematic...
-- Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. Windows found: (R)emove, (E)rase, (D)eleteReceived on Sun Feb 07 2010 - 15:06:19 MST
This archive was generated by hypermail 2.2.0 : Tue Feb 09 2010 - 12:00:04 MST