On Mon, Dec 04, 2000, Heusden, Folkert van wrote:
> Hi,
>
> >From the source-code of squid 2.4 devel 4 I saw (grep sendfile src/*) that
> squid is not using the 'sendfile()' command. Is there any reason for that?
> From what I read in the manpage (under Linux), this command can improve
> performance dramatically (especially when using with the setsockopt(fd,
> SOL_TCP, TCP_CORK, NULL, 0); command).
> If it's a matter of time or anything, maybe you can tell me what function
> does the actual disk-to-socket transfer so that I can implement things
> myself?
>
> >From what I read in the man-page, I could conclude that it's not used
> because it's not 100% portable. If that is so, where do we have the
> ./configure -script for?
>
> Also; the TCP_CORK setsockoption could also be used apart from the
> sendfile-thing.
Aha!
I looked at sendfile()ing stuff a while back. It wasn't easy. You might
be able to shoehorn it in somehow, but it really requires storage manager
changes.
Yes, sendfile() is a good thing. Perhaps not for the headers (since we
don't store ready-to-blit objects) but for the object body its a definite
win.
Yes, its not portable outside linux. FreeBSD has a sendfile() but only
does file -> socket transfers right now.
As for TCP_CORK, I haven't looked at that.
Feel free to send me patches. :-)
Adrian
-- Adrian Chadd "Garth, Marriage is punishment for <adrian@creative.net.au> shoplifting in some countries." - Wayne, to Garth, Waynes WorldReceived on Tue Dec 05 2000 - 03:17:21 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:02 MST