CPU benchmark advice

Fragment of a discussion from User talk:Voidious
Jump to navigation Jump to search

FYI, running Diamond 1.6.7 vs itself as above, on Robocode 1.7.4.0, I get:

  • 1 instance: 65s (yes, 1 is taking longer than 4 right now, wtf?)
  • 4 instances: 4th one finishes at 53.34s. (~13.34s / battle)
  • 8 instances: 8th one finishes at 80.47s. (~10.11s / battle)

One thing I find very odd is it's setting the CPU constant higher here than on my MacBook Pro (5.8m vs 4.0m). Seems like running Diamond 1.7.37 vs itself is about twice as fast, so I'm not sure what's up with that.

Anyway, enough screwing around, time to kick off some RoboResearch. =)

Voidious19:06, 28 June 2012

Probably Intel Turbo Boost is confusing the Robocode engine. The engine assumes CPU speed is constant, which is not true with Turbo Boost. CPU constant is being measured while the clock is still low.

MN20:05, 28 June 2012
 

I'd guess dynamic clocking (i.e. turbo boost) also explains the 4 instances running faster than 1, since 1 instance may not be setting the cpu usage high enough for the CPU to go to it's full clock speed.

Rednaxela20:09, 28 June 2012
 

I figured you guys were right, but I tried running 1-3 threads of RoboResearch to trigger any clock increase and recalculating the CPU constant while that was going on, and it came out even higher. My best guess is the benchmark used to calculate CPU constant is just way more optimized on Mac and/or on Apple's JVM than in Ubuntu/OpenJDK. Still sounds like a good bet on the slow result for 1 instance though.

Voidious22:19, 28 June 2012

Try running background threads in lower priority, or clients in higher priority.

But never tried OpenJDK, I´m using Oracle/Sun Hotspot JVM here.

MN15:43, 29 June 2012