* Sendto() Latency: a correction
@ 1994-05-02 15:40 Kam Lee
1994-05-03 11:02 ` Burkhard Neidecker-Lutz
0 siblings, 1 reply; 2+ messages in thread
From: Kam Lee @ 1994-05-02 15:40 UTC (permalink / raw)
Sorry that I made an error in the previous posting. The
correct version is appended here:
/*--------------------------------------------------------*/
Hi,
I measure the latency of the sendto() call on an Alpha running OSF1.3
using:
gettimeofday(starttime);
sendto(udp_socket, message_size);
gettimeofday(endtime);
latency = endtime - starttime
The results are kind of puzzling. Basically, when message_size is
small (e.g. < 512 bytes), the latency of a single sendto() is less
than 1 us, below the resolution of gettimeofday(). However, as
message size is increased to 1024 bytes or larger, the latency
jumps to 976 us.
Then, I did the following:
gettimeofday(starttime);
for(i=1; i<=n; i++)
{
sendto(udp_socket, message_size);
}
gettimeofday(endtime);
latency = endtime - starttime
With message_size = 8, and n = 2, the latency is almost always
976 us. When n = 6, the latency becomes 2 times 976 us, and
seems to increase in multiple of 976 us as n gets bigger.
Can you explain the origin of this magic number 976, and the
discreteness of the latency?
Thanks a lot,
K.L.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Sendto() Latency: a correction
1994-05-02 15:40 Sendto() Latency: a correction Kam Lee
@ 1994-05-03 11:02 ` Burkhard Neidecker-Lutz
0 siblings, 0 replies; 2+ messages in thread
From: Burkhard Neidecker-Lutz @ 1994-05-03 11:02 UTC (permalink / raw)
In article <Cp6M7C.A2w.3@cs.cmu.edu> kaml+@cs.cmu.edu (Kam Lee) writes:
>I measure the latency of the sendto() call on an Alpha running OSF1.3
>using:
>
> Stuff deleted
>
The *actual* resolution of gettimeofday is not better than 1/1024th
of a second (defined somewhere, I forgot which header file). Therefore
your are measuring either one clock tick or zero clock ticks, depending
on whether they happen to fall across a timer interrupt or not (i.e.
it doesn't necessarily take a full clock tick to do the call).
Burkhard Neidecker-Lutz
Distributed Multimedia Group, CEC Karlsruhe
Advanced Technology Group, Digital Equipment Corporation
neideck@nestvx.enet.dec.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1994-05-03 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-05-02 15:40 Sendto() Latency: a correction Kam Lee
1994-05-03 11:02 ` Burkhard Neidecker-Lutz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox