On Fri, 9 Jun 2006, Linus Torvalds wrote:
You can try to approximate the latency by just looking at the number of
packets, and using a large MTU (and on localhost, the MTU will be pretty
large - roughly 16kB. Don't count packet size at all, just count how many
packets each protocol sends (both ways), ignoring packets that are just
empty ACK's.
Btw, the reason you should ignore empty acks is that they happen when you
have a nice streaming one-way thing, because the TCP rules say that you
should send an ACK every two full packets minimum, even if you have
nothing to say.
So empty acks really approximate to "streaming data", while packets with
payload _could_ obviously mean "nice streaming data going both ways", but
almost always end up being synchronization discussion of some sort.
Linus