accurate runtime accounting (was Load Avarage graph pattern)

Jack F. Vogel jackv at turnkey.tcc.com
Wed Jun 19 06:06:13 AEST 1991


In article <14398 at dog.ee.lbl.gov> torek at elf.ee.lbl.gov (Chris Torek) writes:
|In article <14081 at dog.ee.lbl.gov> I noted that Unix CPU accounting is
|generally fairly poor, and wrote:
|>>The solution is simple but requires relatively precise clocks. ...
 
|In article <1991Jun12.130441.20640 at fccc.edu> stodola at orion.fccc.edu
|(Robert K. Stodola) writes:
|>One of my associates and I did a study of this a number of years ago
|>(actually it was with a PDP-11/70 running IAS).  We found that there
|>was substantial clock synchronized usage on the system.  The solution
|>we found didn't require very precise clocks at all.  Simply one whose
|>rate was relatively prime to the system clock.
 
|This works well in a number of situations, but I believe it will miss
|short-lived processes on modern (fast) machines.
 
Right! What we did to solve this problem in AIX/370 was to go to an
interval accounting scheme. Process time usage is not charged in
hardclock(), rather user time is calculated and charged on entering
the kernel, system time on returning to user mode or in swtch() when
being preempted. Actual memory/time integral calculation is done
either in hardclock() or before a process exits in the exit() system
call. Use is also made of the 370 cputimer for microsecond resolution.
Certainly made things more accurate than the older method.

Disclaimer: I don't speak for my employer.


-- 
Jack F. Vogel			jackv at locus.com
AIX370 Technical Support	       - or -
Locus Computing Corp.		jackv at turnkey.TCC.COM



More information about the Comp.unix.wizards mailing list