[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: G3's, G4's, Altivec, DVD's, iBooks, and TiBooks

Michel Lanners writes:
> On  25 Oct, this message from Michel D\344nzer echoed through cyberspace:

>> How do you measure the CPU usage?
> Yeah, lame top ;-)
>> Peter Surda suggests that top doesn't
>> tell the whole truth. Unfortunately, I seem to have lost his mail
>> explaining how to get more accurate numbers, but it should be found on
>> Xpert or l-k.
> Maybe run it under time? Doesn't give absolute CPU usage, but at least
> it can do comparison.


Old versions of "top" were indeed terrible. I fixed that, but it
remains an awful tool because the kernel does not provide good
CPU usage values. Don't bother with "time" either; the kernel is
an equal-opportunity crap supplier. Imagine an app that runs for
9 ms on every clock tick... 90% usage shows as 0% usage!

Run everything at a real-time priority, except for an idle eater
that you can measure. You want a "loops executed per second" value
out of your idle eater. See what you get while playing video, and
what you get while not playing video. Compute CPU usage from that.

As desired, have the idle eater dirty some cache lines or mess
with the FPU. Then you get info that hints at how hard you are
pushing the memory bus, etc.

Reply to: