From: bortzmeyer@cnam.fr (Stephane Bortzmeyer)
Subject: SUMMARY: IP delivers packets only every milli-second?
Date: 1995/08/21 [thread overview]
Message-ID: <41a7v8$kpj@sheckley.cnam.fr> (raw)
In-Reply-To: 4078vd$1sr@sheckley.cnam.fr
On Tuesday 8 August 95, at 8 h 58, the keyboard of bortzmeyer@cnam.fr (Stephane Bortzmeyer) wrote:
> I'm experimenting with ping on an Alpha (DEC 3000/600S) with
> OSF/1 2.0. Apparently, ping round-trip times are always
> multiples of 0.977 ms (1 second / 1024...). I don't see the
> same behaviour on Linux, for instance.
>
> Replacing gettimeofday by getclock, as suggested by the man
> page apparently changes nothing.
>
> Does anyone know how to obtain a better time resolution (one
> milli-second is clearly too long for an Alpha on Ethernet)?
Well, as explained by Jeffrey Mogul <mogul@pa.dec.com> and a few others,
IP delivers packets when they arrive, not at discrete intervals. getclock
changes nothing because it's just another library routine on the top of
gettimeofday. According to Jeffrey Mogul, "Sooner or later, perhaps in
the next major release, Digital UNIX [the new name of OSF/1] will sup-
port microsecond resolution in gettimeofday()." (Linux already has
it.)
In the mean time, there exist an (unsupported) way to reach that pre-
cision: directly read the program counter of the Alpha. Here is Jef-
frey Mogul's code to do that:
--------- readpcc.s -----------------
#define v0 $0
#define ra $26
#define sp $30
#define zero $31
.align 4
.globl ReadPCC
.ent ReadPCC,0
ReadPCC:
.frame sp,0,ra
rpcc v0 # read the process cycle counter
ret zero,(ra)
.end ReadPCC
--------- end of readpcc.s -----------------
To use it, you first calibrate the processor and then you use that
routine to improve gettimeofday results. As far as I know, the full
code is not redistributable but it's quite simple.
I've used this improved gettimeofday in my traceroute Web page:
http://web.cnam.fr/Network/traceroute.html
which indicates the speeds of the various links encountered.
Thanks to everybody and specially to Jeffrey Mogul <mogul@pa.dec.com>,
Eric Werme USG <werme@zk3.dec.com> and Dave Cherkus <cherkus@UniMaster.COM>.
Stephane Bortzmeyer Conservatoire National des Arts et Metiers
bortzmeyer@cnam.fr Laboratoire d'Informatique
292, rue Saint-Martin
tel: +33 (1) 40 27 27 31 75141 Paris Cedex 03
fax: +33 (1) 40 27 27 72 France
"C'est la nuit qu'il est beau de croire a la lumiere." E. Rostand
prev parent reply other threads:[~1995-08-21 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-08-08 4:00 IP delivers packets only every milli-second? Stephane Bortzmeyer
1995-08-14 4:00 ` Alexander A. Senkevitch
1995-08-21 4:00 ` Stephane Bortzmeyer [this message]
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