On 5/20/06, Florian Weimer <[EMAIL PROTECTED]> wrote:
* Graham Fawcett:

> Small content can be sent extremely efficiently if the entire HTTP
> response can be fit into a single IP frame -- that is, both the
> header+body is smaller than the MTU on the IP interface, and the
> message is sent at once to the output-port, not dribbled out via
> multiple write requests (which can force the output to be fragmented
> across multiple packets). It may be a Linux-specific problem -- there
> appear to be numerous posts on the Web about small-message passing
> over TCP on Linux being something of a bottleneck.

This is likely caused by the Nagle algorithm.  There are various
workarounds (TCP_CORK on Linux, or more portable variants such as
TCP_NODELAY and writev/sendmsg).

Thanks, I hadn't heard about writev/sendmsg, I'll look at those! I
didn't want to just disable Nagle, since not all of the messages on an
HTTP connection will be small and "bursty".

Graham


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to