Bill Unruh <(E-Mail Removed)> wrote:
> Is there any way of telling the system to send out a packet
> urgently? ntp timestamps a packet, delivers it to the network
> subsystem. That packet is then sent out to the other computer, and
> timestamped there at receipt and transmission. The problem is that
> Linux seems to take its time about actually sending out the
> packet. I have looked at the timestamp on the packet, and compared
> it to the time reported by tcpdump for the packet, and they differ
> by from 10s of microseconds to many many milliseconds. While the
> first is fine, the second is attrocious. Note that I do a pre ping
> of the source so that there should not be an arp cache problem.
I keep forgetting - on linux is tcpdump getting the timestamp from the
kernel, or calling gettimeofday() itself? If the latter, then
scheduling delays in running tcpdump itself could be giving a false
indication of delay in packet transmission. If you have more than one
core in the system it might not be a bad idea to use taskset (iirc) to
make sure that the ntpd and the tcpdump process run on different
cores.
I'm reasonably certain that an outbound packet will be sniffed before
the transmit completion interrupt takes place (because otherwise there
is a really nasty ordering problem for tcpdump), but it might not be a
bad idea to triple check that - with interrupt avoidance schemes in
various NICs these days, it can be quite a while from when the packet
is actually transmitted, and when the transmit completion happens.
Disabling the interrupt avoidance might be an interesting experiment.
Depending on the type of NIC that would be either via ethtool or
module parameters.
Just how busy is the NIC out which the NTP traffic is being sent? How
far across the network is the packet going - just local LAN, or out
across the big bad internet?
--
denial, anger, bargaining, depression, acceptance, rebirth...
where do you want to be today?
these opinions are mine, all mine; HP might not want them anyway...

feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...