Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Sendto() Latency
@ 1994-05-02 15:36 Kam Lee
  0 siblings, 0 replies; only message in thread
From: Kam Lee @ 1994-05-02 15:36 UTC (permalink / raw)


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] only message in thread

only message in thread, other threads:[~1994-05-02 15:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-05-02 15:36 Sendto() Latency Kam Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox