Re: squid-2.4.DEVEL4 & 'sendfile()' and/or setsockopt(fd, SOL_TCP, TCP_CORK,

From: Robert Collins <robert.collins@dont-contact.us>
Date: Tue, 5 Dec 2000 08:26:30 +1100

----- Original Message -----
From: "Heusden, Folkert van" <f.v.heusden@ftr.nl>
To: <squid-dev@squid-cache.org>
Sent: Tuesday, December 05, 2000 4:03 AM
Subject: FW: squid-2.4.DEVEL4 & 'sendfile()' and/or setsockopt(fd, SOL_TCP, TCP_CORK,

> 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.
>
>
> Greetings,
> Folkert van Heusden (www.vanheusden.com, folkert@vanheusden.com)
>

I am speaking from a position of ignorance :]
==
$ man sendfile
man: no entry for sendfile in the manual.
$ man -k sendfile
sendfile: nothing appropriate
==
well that's openBSD out of the way.

Seriously though, sendfile AFAIK doesn't allow us to insert the http information we want to. This will include transfer-encoding
details such as chunk delimiters. Also we may want to gzip the file before sending. (These features are in development... HTTP/1.1
requires chunking as a minimum).

what does TCP_CORK do?
=
$ man -k TCP_CORK
tcp_cork: nothing appropriate
=

I seem to be in the dark about it:]

Rob
Received on Mon Dec 04 2000 - 14:18:33 MST

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