Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!pyramid!prls!mips!mash From: mash@mips.UUCP (John Mashey) Newsgroups: comp.arch Subject: Re: myths & magazines [really: HZ] Message-ID: <953@winchester.UUCP> Date: Sat, 21-Nov-87 06:35:28 EST Article-I.D.: winchest.953 Posted: Sat Nov 21 06:35:28 1987 Date-Received: Mon, 23-Nov-87 03:42:53 EST References: <56700004@ada-uts> <6745@apple.UUCP> <916@winchester.UUCP> <3425@ames.arpa> <925@winchester.UUCP> <15580@watmath.waterloo.edu> Reply-To: mash@winchester.UUCP (John Mashey) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 40 In article <15580@watmath.waterloo.edu> ccplumb@watmath.waterloo.edu (Colin Plumb) writes: >In article <925@winchester.UUCP> mash@winchester.UUCP (John Mashey) writes: ... >And in the benchmark skill list: >>5) Wizard: not only does all of 4), but is competent at spotting ... >>Has good idea when somebody sets HZ wrong. Knows when disk benchmarks >(blush)... What's "HZ"? The closest I can come is Hertz, but that's >usually not settable by anything but a motherboard swap. :-) The following varies from UNIX to UNIX, and from system to system, but basically, UNIX times are usually reported in 1/HZ units, where HZ is the clock rate used for process timing. Benchmarks that perform their own internal timing will usually contain: #define HZ 60 and then convert clock ticks to seconds appropriately. However, the correct number might be: 100, 50, 40, 30, etc. If you run the benchmark without being careful, and, for example, HZ=30 would be right, the system will be reported as twice as fast as it really is. This is not a theoretical problem: I've run into it two or three times where a prospect reported either that we were slower than expected, or some other machine was faster than expected because of this. Remedies: #1: Before doing anything, make sure that the various incarnations of time (/bin/time, csh's time, etc) are correct by running cpu benchmarks that are long enough to be checked by your watch. (Don't laugh: when I was at CT, we once got harrassed by comparison with some 286 box that looked faster because time was compiled wrong). #2: Check the source of any benchmark that defines HZ, and make sure it is set right. #3: When writing a benchmark with internal timing, it is probably good to not only print a computed rate (Whetstones, Dhrystones, etc), but to print the total elapsed time, which can easily be eyeballed against the time(1) output. -- -john mashey DISCLAIMER: UUCP: {ames,decwrl,prls,pyramid}!mips!mash OR mash@mips.com DDD: 408-991-0253 or 408-720-1700, x253 USPS: MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086