On Mon, 1 Oct 2007, Larry McVoy wrote: > > but the client looks like > > connect(3, {sa_family=AF_INET, sin_port=htons(31235), > sin_addr=inet_addr("10.3.9.1")}, 16) = 0 > read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1048576) > = 2896 > read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1048576) > = 1448 > read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1048576) > = 2896 ..
This is exactly what I'd expect if the machine is *not* under excessive load. The system calls are fast enough that the latency for the TCP stack is roughly on the same scale as the time it takes to receive one new packet, so since a socket read will always return when it has any data (not until it has filled the whole buffer), you get exactly that "one or two packets" pattern. If you'd be really CPU-limited or under load from other programs, you'd have more packets come in while you're in the read path, and you'd get bigger reads. But do a tcpdump both ways, and see (for example) if the TCP window is much bigger going the other way. Linus - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html