[squeak-dev] Hydra benchmarking

Igor Stasenko siguctua at gmail.com
Tue Feb 26 07:10:27 UTC 2008


On 26/02/2008, Andreas Raab <andreas.raab at gmx.de> wrote:
> Hi -
>
>  I was demoing Hydra at VPRI today and Yoshiki came up with a nice little
>  idea for a Hydra benchmark. It basically goes like this:
>
>  HydraVM doIt: 'Transcript cr; show: ''Background: '', 0 tinyBenchmarks'
>  at: 2.
>  Transcript cr; show: 'Foreground: ', 0 tinyBenchmarks.
>
>  The interesting part is that on a multi-core box it "does the right
>  thing" which means it basically prints the same results in roughly the
>  same time.
>
>  What is weird is that on a single-core box, I get the "same results" but
>  for the wrong reasons and apparently offset by a couple of seconds. It
>  behaves as if first the foreground process runs and then the background
>  process. Anyone having an idea how to fix the benchmark so that it comes
>  up with the correct numbers on a single core box?
>
I think it's because main thread have slightly higher priority in windows.
Try load two secondary images and use:

 (HydraInterpreter at: 2) doIt: 'Transcript cr; show: ''First: '', 0
tinyBenchmarks'.
 (HydraInterpreter at: 3) doIt: 'Transcript cr; show: ''Second: '', 0
tinyBenchmarks'.

This is results on my single core:

First: 93498904 bytecodes/sec; 2251285 sends/sec
Second: 91756272 bytecodes/sec; 2230768 sends/sec


Also, i'd do it like following:

[ HydraVM doIt: 'Transcript cr; show: ''Background: '', [ 0
tinyBenchmarks ] timeToRun'
  at: 2.
  Transcript cr; show: 'Foreground: ',  [0 tinyBenchmarks] timeToRun.
] timeToRun

On single core, sum of local+remote doit, should be roughly equivalent
to outer timeToRun.
On dual core all #timeToRun should be roughly equivalent.

>  [BTW, if you have dual-core I'm pretty sure that extending the above by
>  a couple more images will show similarly skewed results]
>
>  Cheers,
>
>    - Andreas
>
>


-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list