measuring NFS calls using timers
Abhijit Khale
akhale at chamomile.uucp
Thu Jul 19 03:23:08 AEST 1990
In article <2518 at inews.intel.com> kseshadr at quasar.intel.com () writes:
>workstations on our network. This is sort of in the nhfsstone tradition
>except that I want to do this when the workstation is being used.
>Consequently I DON'T want to carry out N (read large N) number of NFS ops,
>and calculate the average time to service each request. Ideally I would
>like to carry out a single call and time it. This is where I've run into
>problems using the profiling timer. I'm doing this on a Sun 386i running
>SunOS 4.0.2 and it seems like the NFS call is being completed even before
>the timer is decremented. As a result the operation appears to happen in
>time 0 (wouldn't that be nice :-). Either I'm doing something wrong or
>SunOS is not very good about microsecond timings.
SunOS is not good about microsecond timings. The system clock interrupts
a 100 times every second. In Sun-4s, this gives you a timing
resolution of 10 ms. In non-Sparc Suns, every second interrupt is thrown
away, so the resolution you get is 20 ms.
That is the basic resolution for interrupts etc. But SparcStations give you
a microsecond counter. If you call gettimeofday() or (adjtime() within the
kernel), an SS-1 will give you microsecond resolution. SS-1+'s and SLCs
also have the microsecond counter, but owing to some truly braindamaged code
they dont use it ( Although the fix is trivial if you have source : I
believe there's a binary patch for that floating around too).
>I seem to recall some fixes to the nit_if.o file for
>the tcpdump program. The README file that came with the program mentioned
>that their version of nit.o gave timestamps to the resolution of the SS-1
>clock (1 us) rather than the 20ms timestamps the Sun normally gives.
That only works for SparcStations.
To sum up, you can get microsecond resolution with SS-1s. For SS-1+s and
SLCs, with some effort. For Sun-3s and other Sun-4s you have to get
a special board to do this ( mail me if you want to know how to get this
board). I don't think theres any way of getting this in a 386i.
One possible way to do this is to have a machine capable of getting
microsecond resolution to use an ethernet spy ( tcpdump or etherfind
come to mind) on your network and generate timestamps for your NFS packets.
Another way is ( assuming you have source and feel brave) to hack the
scheduler or to up the clock tick rate. The most you can realistically
get by upping the clock tick rate is probably 500 microsecond, though.
Abhijit
akhale at parc.xerox.com akhale at jerico.usc.edu
Computer Sciences Lab, Xerox Palo Alto Research Center.
More information about the Comp.unix.questions
mailing list