* [ltt-dev] Experiments on CPU time statistics
@ 2010-11-11 17:50 Francis Giraldeau
2010-11-11 18:59 ` Mathieu Desnoyers
0 siblings, 1 reply; 4+ messages in thread
From: Francis Giraldeau @ 2010-11-11 17:50 UTC (permalink / raw)
Hi,
I'm doing some experiments with CPU statistics, and I think that those
computed by lttv are wrong. I did 3 tests, and for each command the
time utility was used to get a baseline, and the command has been run
between lttctl -C and lttctl -D to get a tight window around the test
process.
=================================================
trace-bonnie.sh : start bonnie++ process for 10s
time statistics:
real 0m10.715s
user 0m0.420s
sys 0m6.350s
lttv statistics:
events count : 11088588
cpu time : 80.051904112
elapsed time? : 544.593369365
cumulative cpu time : 6.747053976
=================================================
sleep 1s : start a sleep of 1s
time statistics:
real 0m1.002s
user 0m0.000s
sys 0m0.000s
lttv statistics:
events count : 94929
cpu time : 7.841686487
elapsed time : 34.566952675
cumulative cpu time : 0.036465023
=================================================
trace-burn.sh 1s * 8 process simultan?s
time statistics:
real 0m1.031s
user 0m7.650s
sys 0m0.020s
lttv statistics:
events count : 95402
cpu time : 8.584145675
elapsed time : 33.845893813
cumulative cpu time : 0.037255816
=================================================
I was expecting lttv enlapsed time to be close to real time, lttv
cumulative cpu time to be greater or equal to lttv cpu time, and lttc
cpu time to match user + sys time. Does it make sens, or maybe I'm
getting something wrong?
Cheer,
Francis
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] Experiments on CPU time statistics
2010-11-11 17:50 [ltt-dev] Experiments on CPU time statistics Francis Giraldeau
@ 2010-11-11 18:59 ` Mathieu Desnoyers
2010-11-11 19:23 ` Michel Dagenais
2010-11-11 21:05 ` Francis Giraldeau
0 siblings, 2 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2010-11-11 18:59 UTC (permalink / raw)
* Francis Giraldeau (Francis.Giraldeau at USherbrooke.ca) wrote:
> Hi,
>
> I'm doing some experiments with CPU statistics, and I think that those
> computed by lttv are wrong. I did 3 tests, and for each command the time
> utility was used to get a baseline, and the command has been run between
> lttctl -C and lttctl -D to get a tight window around the test process.
>
> =================================================
> trace-bonnie.sh : start bonnie++ process for 10s
>
> time statistics:
> real 0m10.715s
>
> user 0m0.420s
>
> sys 0m6.350s
>
>
> lttv statistics:
>
> events count : 11088588
>
> cpu time : 80.051904112
cpu time should be good. How many cores does you machine have ? 8 ?
>
> elapsed time? : 544.593369365
Elapsed time is the total of the per-thread elapsed time I think (it's
really been a while since I played with this code though). It would make
sense if you have 54 threads in your system.
I don't have entire confidence that the elapsed time is correct.
>
> cumulative cpu time : 6.747053976
cumulative cpu time is known to be wrong.
Thanks,
Mathieu
>
> =================================================
> sleep 1s : start a sleep of 1s
>
> time statistics:
> real 0m1.002s
>
> user 0m0.000s
>
> sys 0m0.000s
>
>
> lttv statistics:
> events count : 94929
>
>
> cpu time : 7.841686487
>
> elapsed time : 34.566952675
>
> cumulative cpu time : 0.036465023
>
>
> =================================================
> trace-burn.sh 1s * 8 process simultan?s
>
> time statistics:
> real 0m1.031s
>
> user 0m7.650s
>
> sys 0m0.020s
>
>
> lttv statistics:
> events count : 95402
>
> cpu time : 8.584145675
>
> elapsed time : 33.845893813
>
> cumulative cpu time : 0.037255816
> =================================================
>
> I was expecting lttv enlapsed time to be close to real time, lttv
> cumulative cpu time to be greater or equal to lttv cpu time, and lttc
> cpu time to match user + sys time. Does it make sens, or maybe I'm
> getting something wrong?
>
> Cheer,
>
> Francis
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] Experiments on CPU time statistics
2010-11-11 18:59 ` Mathieu Desnoyers
@ 2010-11-11 19:23 ` Michel Dagenais
2010-11-11 21:05 ` Francis Giraldeau
1 sibling, 0 replies; 4+ messages in thread
From: Michel Dagenais @ 2010-11-11 19:23 UTC (permalink / raw)
>> time statistics:
>> real 0m10.715s
>>
>> user 0m0.420s
>>
>> sys 0m6.350s
...
> Elapsed time is the total of the per-thread elapsed time I think (it's
> really been a while since I played with this code though). It would make
> sense if you have 54 threads in your system.
>
> I don't have entire confidence that the elapsed time is correct.
As a side note, while the elapsed time provided by "time" is probably
reliable, the user and system time are obtained by sampling under
asumptions which are sometimes not met. Arbitrarily large deviations
from the reality are possible. The CPU time computed from the LTTng
trace data is exact, not statistical.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] Experiments on CPU time statistics
2010-11-11 18:59 ` Mathieu Desnoyers
2010-11-11 19:23 ` Michel Dagenais
@ 2010-11-11 21:05 ` Francis Giraldeau
1 sibling, 0 replies; 4+ messages in thread
From: Francis Giraldeau @ 2010-11-11 21:05 UTC (permalink / raw)
Mathieu Desnoyers <compudj at krystal.dyndns.org> a ?crit?:
>> =================================================
>> trace-bonnie.sh : start bonnie++ process for 10s
>>
>> time statistics:
>> real 0m10.715s
>> user 0m0.420s
>> sys 0m6.350s
>>
>>
>> lttv statistics:
>> events count : 11088588
>> cpu time : 80.051904112
>
> cpu time should be good. How many cores does you machine have ? 8 ?
Thanks for explainations. Yes, the system has 8 cores. The maximum CPU
time for 1 second is hence 8 seconds.
>> =================================================
>> sleep 1s : start a sleep of 1s
>>
>> time statistics:
>> real 0m1.002s
>> user 0m0.000s
>> sys 0m0.000s
>>
>>
>> lttv statistics:
>> cpu time : 7.841686487
How then can we explain that on an idle system, the CPU time is yet
(almost) the number of CPUs times the trace duration?
Cheer,
Francis
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-11 21:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-11 17:50 [ltt-dev] Experiments on CPU time statistics Francis Giraldeau
2010-11-11 18:59 ` Mathieu Desnoyers
2010-11-11 19:23 ` Michel Dagenais
2010-11-11 21:05 ` Francis Giraldeau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox