Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!snorkelwacker!bloom-beacon!LIGHTNING.MCRCIM.MCGILL.EDU!mouse From: mouse@LIGHTNING.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: What does xload measure ?? (sunclock) Message-ID: <9010050913.AA02121@lightning.McRCIM.McGill.EDU> Date: 5 Oct 90 09:13:56 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 35 >>> When sunclock is running xload shows the load going from 1/2 to >>> just over 2. The cpu usage from ps shows only 12/sec per hour >>> though. > The problem is that the kernel samples the length of the run queue at > regular intervals, and meanwhile xload and sunclock and other similar > programs are sleeping and running at similar regular intervals. The > intervals can start beating against each other, going in and out of > sync, and making the load average number meaningless. As another data point, I had a program that asked the kernel for a SIGALRM 100 times a second, which amounted to every hardware clock tick. Every clock tick, therefore, this process would go runnable and be counted in the kernel's load average figure. However, the vast majority of these clock ticks caused very little computation - perhaps several dozen instructions plus signal delivery overhead. Result: an increase in the load figure of 1, but no real cycle sink. The load average figure is nothing but a rather crude approximation. It is useful for some things but there are many things that can cause it to be nearly worthless. (One machine here - a slow machine, a VAX-11/750 - has been seen with the load figure over 60 but with response time not noticeably degraded compared to the usual value of around 2. Granted, this was an extreme case.) > Moral: dump xload in the toilet. Use xcpu or xmeter or something > like them instead. What are xcpu and/or xmeter, and how do they avoid the sort of problems under discussion? der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu