Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: kaml+@cs.cmu.edu (Kam Lee)
Subject: Sendto() Latency
Date: Mon, 2 May 1994 15:36:39 GMT	[thread overview]
Message-ID: <Cp6M15.9wC.3@cs.cmu.edu> (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.



                 reply	other threads:[~1994-05-02 15:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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