Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to send out a packet urgently?

Reply
Thread Tools Display Modes

How to send out a packet urgently?

 
 
Bill Unruh
Guest
Posts: n/a

 
      11-28-2007, 12:09 AM
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.

Is there some way of labeling a packet so that it is sent out urgently by
the networking subsystem?


 
Reply With Quote
 
 
 
 
Gretch
Guest
Posts: n/a

 
      11-28-2007, 12:31 AM
In news:rd33j.10868$HH2.1077@edtnps82,
Bill Unruh <(E-Mail Removed)> wrote:

> Is there some way of labeling a packet so that it is sent out
> urgently by the networking subsystem?


Assign a higher priority: "man nice" for more information.
 
Reply With Quote
 
David W. Hodgins
Guest
Posts: n/a

 
      11-28-2007, 12:55 AM
On Tue, 27 Nov 2007 20:09:43 -0500, Bill Unruh <(E-Mail Removed)> wrote:

> Is there some way of labeling a packet so that it is sent out urgently by
> the networking subsystem?


Not that I'm aware of, however if you are running the ntpd daemon, it
souldn't matter. If you read the description, from the man page of
ntpdate, it uses multiple samples. Getting it out, and back fast,
is much less important, than consistent processing, of all packets.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
 
Reply With Quote
 
Peter D.
Guest
Posts: n/a

 
      11-28-2007, 02:35 AM
on Wednesday 28 November 2007 12:31
in the Usenet newsgroup alt.os.linux.mandriva
Gretch wrote:

> In news:rd33j.10868$HH2.1077@edtnps82,
> Bill Unruh <(E-Mail Removed)> wrote:
>
>> Is there some way of labeling a packet so that it is sent out
>> urgently by the networking subsystem?

>
> Assign a higher priority: "man nice" for more information.


There are many steps in the chain. It is also possible to
"jump the queue" at the network level, but exactly how
to do it is beyond my knowledge.


--
sig goes here...
Peter D.
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      11-28-2007, 03:53 PM
"Gretch" <(E-Mail Removed)> writes:

>In news:rd33j.10868$HH2.1077@edtnps82,
>Bill Unruh <(E-Mail Removed)> wrote:


>> Is there some way of labeling a packet so that it is sent out
>> urgently by the networking subsystem?


>Assign a higher priority: "man nice" for more information.


?? That is a priority on the program. Not on the packet it creates. The
program is clearly running when it creates the packet, and hands it off to
the networking routines. It is the subsequent handling of that packet by
the kernel that is at issue.
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      11-28-2007, 04:07 PM
"David W. Hodgins" <(E-Mail Removed)> writes:

>On Tue, 27 Nov 2007 20:09:43 -0500, Bill Unruh <(E-Mail Removed)> wrote:


>> Is there some way of labeling a packet so that it is sent out urgently by
>> the networking subsystem?


>Not that I'm aware of, however if you are running the ntpd daemon, it
>souldn't matter. If you read the description, from the man page of
>ntpdate, it uses multiple samples. Getting it out, and back fast,
>is much less important, than consistent processing, of all packets.


The problem is that the processing is not consistant. Thus, on one packet,
you will get the internal timestamp, then the packet waits for 5ms, and is
finally sent out onto the net, while the next packet will be timestamped,
and be sent out 80us later(as measured by comparing tcpdump time for the
packet with the timestamp on the packet). The delay in being sent out is interpreted by
ntp as a clock problem-- the local clock being early-- since mean time
between outgoing timestamp and receipt is earlier than the actual time the
packet was sent out. At times this delay can be almost a second, which
makes accurate timing absurd.



>Regards, Dave Hodgins


>--
>Change nomail.afraid.org to ody.ca to reply by email.
>(nomail.afraid.org has been set up specifically for
>use in usenet. Feel free to use it yourself.)

 
Reply With Quote
 
Dan Espen
Guest
Posts: n/a

 
      11-28-2007, 04:55 PM
Unruh <unruh-(E-Mail Removed)> writes:

> "David W. Hodgins" <(E-Mail Removed)> writes:
>
>>On Tue, 27 Nov 2007 20:09:43 -0500, Bill Unruh <(E-Mail Removed)> wrote:

>
>>> Is there some way of labeling a packet so that it is sent out urgently by
>>> the networking subsystem?

>
>>Not that I'm aware of, however if you are running the ntpd daemon, it
>>souldn't matter. If you read the description, from the man page of
>>ntpdate, it uses multiple samples. Getting it out, and back fast,
>>is much less important, than consistent processing, of all packets.

>
> The problem is that the processing is not consistant. Thus, on one packet,
> you will get the internal timestamp, then the packet waits for 5ms, and is
> finally sent out onto the net, while the next packet will be timestamped,
> and be sent out 80us later(as measured by comparing tcpdump time for the
> packet with the timestamp on the packet). The delay in being sent out is interpreted by
> ntp as a clock problem-- the local clock being early-- since mean time
> between outgoing timestamp and receipt is earlier than the actual time the
> packet was sent out. At times this delay can be almost a second, which
> makes accurate timing absurd.


What definition of accurate are you using?
Did you observe a problem?

The combination of the system clock, and the small adjustments
that ntpd does should give you a very accurate time of day.
 
Reply With Quote
 
Dan Espen
Guest
Posts: n/a

 
      11-28-2007, 05:02 PM
Unruh <unruh-(E-Mail Removed)> writes:

> "David W. Hodgins" <(E-Mail Removed)> writes:
>
>>On Tue, 27 Nov 2007 20:09:43 -0500, Bill Unruh <(E-Mail Removed)> wrote:

>
>>> Is there some way of labeling a packet so that it is sent out urgently by
>>> the networking subsystem?

>
>>Not that I'm aware of, however if you are running the ntpd daemon, it
>>souldn't matter. If you read the description, from the man page of
>>ntpdate, it uses multiple samples. Getting it out, and back fast,
>>is much less important, than consistent processing, of all packets.

>
> The problem is that the processing is not consistant. Thus, on one packet,
> you will get the internal timestamp, then the packet waits for 5ms, and is
> finally sent out onto the net, while the next packet will be timestamped,
> and be sent out 80us later(as measured by comparing tcpdump time for the
> packet with the timestamp on the packet). The delay in being sent out is interpreted by
> ntp as a clock problem-- the local clock being early-- since mean time
> between outgoing timestamp and receipt is earlier than the actual time the
> packet was sent out. At times this delay can be almost a second, which
> makes accurate timing absurd.


You can look up MSG_OOB but I don't know that any ntp servers
are going to support it.
 
Reply With Quote
 
Rick Jones
Guest
Posts: n/a

 
      11-28-2007, 06:13 PM
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...
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(socket) send transmits data on same packet alexia.bee@gmail.com Linux Networking 2 05-29-2008 07:02 PM
Does anyone know how to send UDP packet through HTTP proxy? feiman Linux Networking 2 02-12-2007 09:15 PM
About send packet with BROADCAST addr? Who can help me. bighead_csu@hotmail.com Linux Networking 3 06-05-2006 05:50 AM
Can I send out an ethernet packet with over 1500 bytes in linux ? Hans Yin Linux Networking 4 12-21-2004 07:19 AM
How to send a packet to wake on lan steve Windows Networking 0 02-12-2004 02:30 PM



1 2 3 4 5 6 7 8 9 10 11