On Mon, Sep 17, 2007 at 01:38:02PM -0700, Chuck Swiger wrote:
>
> This depends on your implementation of NAT, and how busy the device  
> is.  I'm familiar with several NAT devices which add somewhere around  
> 10 ms of latency, although newer routers and machines running at  
> HZ=1000 or greater tend to offer around 1ms of latency.

What kind of device adds 10ms? My not-so-new Linux PC (Athlon 1.2 GHz)
with HZ=250 adds under 500µs.

I tested by doing a ping -c 100 from "me" to "remote" in this diagram:

        me -> gigaswitch_1 -> NAT -> gigaswitch_2 -> remote

100 packets transmitted, 100 received, 0% packet loss, time 99159ms
rtt min/avg/max/mdev = 0.325/1.007/1.574/0.515 ms

So, if we assume that the entire RTT is spent by the NAT, the average
time spent in the NAT gateway would be at most 503.5µs.

Pinging different parts of the path:

me -> NAT: 269µs
NAT -> remote: 810µs

Add those two together, and you get 1.079ms, which is actually more than
pinging through the NAT. I think we can safely say that the NAT overhead
is pretty darn low, and vanishes in the noise.

Also, HZ apparently has nothing to do with it; if packets were handled
only once-per-HZ, then to get that 269µ, we'd have to assume both
machines had a HZ around 7500, assuming the data transfer took no time.

(The links to gigaswitch_2 are both running in 100mbps mode, which
probably explains the greater latency.)

-- 
BOFH excuse #446:

Mailer-daemon is busy burning your message in hell.
_______________________________________________
timekeepers mailing list
[email protected]
https://fortytwo.ch/mailman/cgi-bin/listinfo/timekeepers

Reply via email to