Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!turnkey!jackv From: jackv@turnkey.tcc.com (Jack F. Vogel) Newsgroups: comp.unix.wizards Subject: Re: accurate runtime accounting (was Load Avarage graph pattern) Message-ID: <1991Jun18.200613.7806@turnkey.tcc.com> Date: 18 Jun 91 20:06:13 GMT References: <14081@dog.ee.lbl.gov> <1991Jun12.130441.20640@fccc.edu> <14398@dog.ee.lbl.gov> Reply-To: jackv@turnkey.TCC.COM (Jack F. Vogel) Organization: Turnkey Computer Consultants, Westchester, CA Lines: 32 In article <14398@dog.ee.lbl.gov> torek@elf.ee.lbl.gov (Chris Torek) writes: |In article <14081@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@fccc.edu> stodola@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@locus.com AIX370 Technical Support - or - Locus Computing Corp. jackv@turnkey.TCC.COM