On Sep 17, 2007, at 11:49 PM, Anthony DeRobertis wrote: > 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.
A BSD router in device polling mode, running with HZ=100. I or a few former clients still have a handful of Pentium-Pro 200MHz or P2 300MHz machines around that work fine as lightweight firewalls (ie, for T1 or ADSL speeds), and which actually can handle quite a load with reliable delays, by which I mean they better avoid livelock due to the processing model used by polling rather than interrupt-driven network servicing. I would agree that bouncing HZ up to 250 or higher is prudent if the hardware is fast enough to keep up, and more modern NICs with larger packet caches and interrupt mitigation (ie, most gigabit NICs on the market nowadays) are probably a better tradeoff than device polling nowadays. > 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 Well, if you've got several gigabit switches and a 1+GHz box as your NAT router, your latency is going to be much lower than the devices I'm talking about, sure. > 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. http://www.freebsd.org/cgi/man.cgi?query=polling&format=html ...although, of course, it recommends: "As in the worst case the devices are only polled on clock interrupts, in order to reduce the latency in processing packets, it is not advisable to decrease the frequency of the clock below 1000 Hz." ...which would provide 1ms or less of latency. -- -Chuck _______________________________________________ timekeepers mailing list [email protected] https://fortytwo.ch/mailman/cgi-bin/listinfo/timekeepers
