kseshadr@quasar.intel.com (07/18/90)
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. Can anyone point me to a good source of information about carrying out such timings? I don't mind suggestions to RTF parts of the sources or man pages. 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. I've been trying my timings primarily with getattr calls, so its entirely possible that the call completes in less that 20 milliseconds (I'm making sure that I don't hit the attribute cache..). What do I need to do to get timestamps with microsecond resolution and are there any hardware limitations with the Sun 386i that would prevent me from being able to do this? Kishore Seshadri kishore@mipos3.intel.com =============================================================================== Kishore Seshadri (Speaking only for myself) Intel Corp., Santa Clara, CA CSNET: kseshadr@mipos3.intel.com ARPA: kseshadr%mipos3.intel.com@relay.cs.net UUCP:{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!kseshadr
akhale@chamomile.uucp (Abhijit Khale) (07/19/90)
In article <2518@inews.intel.com> kseshadr@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@parc.xerox.com akhale@jerico.usc.edu Computer Sciences Lab, Xerox Palo Alto Research Center.