Lionel Bouton wrote: > I've run the QUIZ benchmark on several systems to check their relative > performance and had quite a surprise. > I'll take Frank's algorithm as reference for simplicity as it spends > roughly the same time for each point distribution in 157_benchmark_2.rb > but this is true for all of them. > > This is on Gentoo Linux, all systems are compiled with gcc 4.1.2 > on 32bit : -O3 -march=i686 -fomit-frame-pointer -pipe > on 64bit : -O2 -pipe Hold on!! Try recompiling the 32-bit version with "march=pentium4" and the 64-bit version with "-O3 -march=athlon64" and *then* compare the timings! You've saddled the 64-bit version with some default architecture and one less optimization level than the 32-bit version. [snip] > The 32bit Core2Duo E6300 is a system with several user-mode-linux based > systems which are idling around (low trafic mail, DNS server and test > systems). It sits at a constant 0 load and zero swap activity. > The benchmark is 2x faster *in* the virtual machine (with the very same > compilation options, the virtual machine is mostly a clone of the host) > : 10s instead of 20s ! That's not a system timer problem, I actually > watched it spend the 10s and 20s. > > I don't know what's going on... Maybe Ruby is making a very specific > system call that happens to be faster with user-mode-linux even though > the benchmark consists of nearly 99% floating point operations. On the Athlon, you can figure out what's going on with CodeAnalyst. I would guess it's something to do with cache thrashing or lack thereof. On the Intel, you might be able to get some results from CodeAnalyst -- it's basically a wrapper around "oprofile". But you might end up needing Intel's VTune. If you do this for a living, it's worth spending the money. :) > > The UML kernel is a 2.6.18 with the UML patches, the host is a 2.6.23.9 > with the skas3 patch (designed to help the UML performance). The UML > sees 512MB, the host has 1GB. As I said, nearly no concurrent system > activity, 0 swapping before during and after the benchmark on both the > host and the virtual machine. > > Anyone seen something remotely like this ? Not me ... but I'm an Intel-free zone. ;)