Re: [TEST/REVIEW] CPU accounting patches



"Poul-Henning Kamp" wrote:
> In message <20060125114544.edawx42obkkos0ck@xxxxxxxxxxxxxxxxxxx>, Alexander L
ei
> dinger writes:
>
>
> >> That way, the user/system time reported will get units of "cpu seconds
> >> if the cpu ran full speed".
> >
> >How large do you expect the error will be?
>
> I don't consider it an error, I consider it increasing precision.
>
>
> If you run
>
> time mycommand
>
> on your laptop, and along the way the CPU clock ramps up from
> 75 MHz to 600 MHz before it reports
>
> user 2.01 sys 0.30 real 4.00
>
> What exactly have you learned from the first two numbers with the
> current definition of "cpu second" ?

"One second's worth of the computer's processing time, which is
based on actual machine cycles used, not calendar time." ?

Is the getrusage() manual page out of date? It claims that user
and system time is is "the total amount of time spent executing in
user mode" and "the total amount of time spent in the system executing
on behalf of the process(es)".

> With my definition you would be more likely to see lower numbers
> maybe
> user 0.20 sys 0.03 real 4.00
>
> And they would have meaning, they should be pretty much the same
> no matter what speed your CPU runs at any instant in time.

For how much of those 4 real seconds was the computer doing something
else using your definition? It's certainly not 3.77. It's probably
closer to 1.69.

> In theory, it should be possible to compare user/sys numbers
> you collect while running at 75 MHz with the ones you got
> under full steam at 1600 MHz.

If my CPU clock runs slower for a period of time, processes remain
on the CPU for longer. I don't really see how 0.23 [wallclock]
seconds _if_ the cpu ran [at] full speed is different to 2.31
wallclock seconds in this context. One is scaled to maximum CPU
clock frequency and the other is scaled to wallclock time.

I find the wallclock scale a bit less confusing because I normally
exist in that scale[1]: on my two hypothetical identical servers, one
clocked down to 50% for some reason, the same job takes twice the
wallclock time but identical CPU time?

Ian

--
Ian Freislich

1. It would be nice to say to my boss that this project would have
taken a week if I'd worked faster and get a fat bonus because I
could have done it faster.
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [TEST/REVIEW] CPU accounting patches
    ... and along the way the CPU clock ramps up from ... If my CPU clock runs slower for a period of time, ... I don't really see how 0.23 [wallclock] ... taken a week if I'd worked faster and get a fat bonus because I ...
    (freebsd-current)
  • Re: ASUS Crosshair help
    ... start cranking the CPU clock from 200 to something higher. ... To experiment in Windows, you are in luck. ... The upper slider should control the CPU clock. ... Orthos will run two copies of the Prime95 Torture Test. ...
    (alt.comp.periphs.mainboard.asus)
  • Re: About Power Manager
    ... Depends on the capability of the cpu. ... Power states that affect other devices would be managed by the higher level ... If I move the CPU into idle mode, I will reduce the CPU clock for power s ... Is it OK for reducing CPU clock in the OEMIdle? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Stolen and degraded time and schedulers
    ... I presume you mean monotonic real time.) ... but I don't think that's terribly useful. ... work_time is probably most naturally measured in cpu clock cycles rather ... In the same way that clock modulation gates the cpu clock, ...
    (Linux-Kernel)
  • Re: timing a method
    ... That's stated to be a count of CPU clock cycles, ... >>be independent of CPU clock rate and drift, ... and Dr John, this is all said and good. ... So no reasonably accurate is going to be reasonably ...
    (alt.comp.lang.borland-delphi)