[plug] Error in Time() command

Daniel Pittman daniel at rimspace.net
Mon May 24 11:58:38 WST 2010


Dion Curchin <tenzero at iinet.net.au> writes:
> On 24/05/2010, at 8:56 AM, Daniel Pittman wrote:
>> "tenzero at iinet.net.au" <tenzero at iinet.net.au> writes:

[...]

>> If you go back and tell us what your actual goal is, we should be able to give
>> you a better answer that will help you get useful information.
>
> Cool. I was testing my java app to produce a baseline performance value to
> compare the relative performance of an hardware accelerator I have built.
>
> As parting of measuring or testing anything, we are supposed to discuss
> sources of error in the measurement.
>
> I accept that the system is variable, caches need to be filled and so on. So
> I repeated measured the timing of execution a number of times, to consider
> the variability of the execution time.
>
> What I was wondering however, was if the test returns a time of say 0.258
> seconds and repeated samples vary by 1 ms eg 0.259, 0.257. Can I truly trust
> the accuracy of that claimed 1ms variability?

I think the SLUG posters covered that in enough detail that repeating it all
here is redundant, but:

You might find some of the hackbench tool useful for investigating some of
these details; for other parts you will probably find empirical testing easier
than citations. :?

> Which is why I was wondering if there was anything on the level of error in
> the Time(1) command. But as you say and my nights reading supports, the
> answer depends on simply too many things to ever be conclusive.
>
>> Starting with "run the process multiple times, because cache effects and
>> memory pressure from other applications *will* change the results."
>
> Thanks for your insights.

No problem.  I imagine that is teaching my grandmother to suck eggs, but my
policy has long been to state the obvious (and non-obvious ;) since you never
know when it will help.

        Daniel

I certainly never do, because it helps me sometimes. :)

-- 
✣ Daniel Pittman            ✉ daniel at rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons



More information about the plug mailing list