From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,f6f8180febe6d220,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-05-02 11:06:23 PST Newsgroups: comp.sys.dec Path: bga.com!news.sprintlink.net!uunet!newsfeed.pitt.edu!nntp.club.cc.cmu.edu!honeydew.srv.cs.cmu.edu!kaml From: kaml+@cs.cmu.edu (Kam Lee) Subject: Sendto() Latency Message-ID: Sender: news@cs.cmu.edu (Usenet News System) Nntp-Posting-Host: n3.sp.cs.cmu.edu Organization: School of Computer Science, Carnegie Mellon Date: Mon, 2 May 1994 15:36:39 GMT 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.