Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Feb 2001 08:46:31 +0800
From:      "David Xu" <davidx@viasoft.com.cn>
To:        "Tony Finch" <dot@dotat.at>, "Kris Kennaway" <kris@obsecurity.org>
Cc:        "bsddiy" <bsddiy@163.net>, <freebsd-net@FreeBSD.ORG>
Subject:   Re: sendfile()
Message-ID:  <001d01c08cb1$9c445d80$6201a8c0@William>
References:  <1217774688.20010201133139@163.net> <20010201023825.A71975@xor.obsecurity.org> <20010201180010.Q70673@hand.dotat.at>

next in thread | previous in thread | raw e-mail | index | archive | help


----- Original Message ----- 
From: "Tony Finch" <dot@dotat.at>
To: "Kris Kennaway" <kris@obsecurity.org>
Cc: "bsddiy" <bsddiy@163.net>; <freebsd-net@FreeBSD.ORG>
Sent: Friday, February 02, 2001 2:00 AM
Subject: Re: sendfile()


> Kris Kennaway <kris@obsecurity.org> wrote:
> Linus's argument against the HP/UX and BSD sendfile() is that, for
> example, in the presence of pipelined HTTP requests it isn't possible
> to avoid poor packet boundaries between responses. TCP_NOPUSH does
> help to solve this problem (it was designed to hack around problems
> with the interaction between mbuf sizes and sosend and tcp_output) but
> it introduces a new problem: at the end of a chain of HTTP responses
> you want the last segment to go out quickly rather than waiting for
> more data to fill the segment. For this reason turning off TCP_CORK
> pushes out queued data, but this isn't the case for TCP_NOPUSH.
> 

if TCP_NOPUSH can simulate TCP_CORK when TCP_NOPUSH is
turned off and last data segment is sent,  I'll be satisfied.
but as I know, it seems TCP_NOPUSH is mainly used for TTCP, right?

the idea behind TCP_CORK is it buffers any small data segment user program 
sending until these segments full fills a max TCP packet, then the packet is sent,  
web servers always send many very small  HTTP headers, cause lots of small packets
sent out,  TCP_CORK  can increase network performance.

Regards,
David Xu

N'rzǧvf&j:+v "ryyb^nrazg

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001d01c08cb1$9c445d80$6201a8c0>