Re: Powers-of-two - 7 for recv() length??

From: Richard B. Johnson
Date: Wed Mar 31 2004 - 13:06:58 EST

On Wed, 31 Mar 2004, Stephen Hemminger wrote:

> What is the socket send/receive buffering, and the underlying network.
> You need to look at the data flow with something like tcpdump and tcptrace.
> If you get flow controlled or lots of other reasons, TCP will validly
> send a small number of bytes (like 1) which will get things out of alignment.

Hmmm. I get lots of truncated IP packets. See attached. I've tried
to help by setting both RCV_BUF and SND_BUF to 1/2 megabytes. Nothing
seems to work except sending only 1436 bytes at a time. That makes
everything miserably slow. 1436 comes from (1500 - 64) 1500 being the
ethernet packet length, 64 being the IP header length.

Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.

Attachment: tcpdump.log.gz
Description: Binary data