Date: Thu, 16 Mar 2006 11:52:14 -0500 From: "Coleman Kane" <zombyfork@gmail.com> To: JoaoBR <joao@matik.com.br> Cc: freebsd-amd64@freebsd.org Subject: Re: amd64 slower than i386 on identical AMD 64 system? / How is hyperthreading handled on amd64? Message-ID: <346a80220603160852u591a2d47p7031409c1d93bfc0@mail.gmail.com> In-Reply-To: <200603160747.00051.joao@matik.com.br> References: <20060313221836.5491916A420@hub.freebsd.org> <346a80220603141520i2ac1a4br66cbfb213453dcd6@mail.gmail.com> <200603151356.27972.peter@wemm.org> <200603160747.00051.joao@matik.com.br>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3/16/06, JoaoBR <joao@matik.com.br> wrote: > > On Wednesday 15 March 2006 18:56, Peter Wemm wrote: > > I tend to agree with this. ubench is not a useful benchmark for > > comparing 32 bit vs 64 bit systems. > > > > However, what might be interesting is to compile a 32 bit binary (and > > statically link it) on the i386 system, and compare the runtime on the > > 64 bit kernel, using the same identical binary. That way you are > > measuring the same math operations on both platforms. Comparing 64 bit > > operations vs 32 bit operations is apples vs oranges. > > > > Of course, it may still be slower, but at least the results would be > > more meaningful. Don't assume the OS is slower because the compiler > > makes the application do twice the work. > > good point > what do you think of unixbench since it does some real-life tasks? > > Jo=E3o I think that you need to determine what comparison is being made. What aspect of the CPUs are you trying to benchmark? Then, do some investigation into what benchmarks will demonstrate your performance comparison. ubench may show that my amd64 mode OS is slower on its tests, but when I run make buildworld with a common TARGET_ARCH, my amd64 setup wins out....and I know that's less scientific... but there must exist scientific benchmarks that demonstrate this. I do a lot of development, A LOT. This involves not only lots of gcc, lex, yacc, make, perl, java, etc... it generally involves lots of operations on large sets of data, building large data trees, and all hordes of other algorithmic fun. Earlier you stated: "Since some time (>6.0R) I have the impression that amd64 runs slower than i386. Now I run some tests on identical hardware and using ubench confirmes this. Somebody has comments on this?" I suppose a good place to start is "What were you expecting?", "Why were yo= u expecting that?", and "What is problematic about the results that you collected?". IMO, I don't expect many of the normal day to day operations on my amd64 machine to be significantly faster than if it were running an i386 kernel. Due to the differences between the two (amd64 and ia32) architectures, it i= s quite likely that certain operations will be faster on one than on the othe= r (and not broadly assume that amd64 will always at least be as well performing as ia32 mode). One good point is that, for instance, in ia32 mode you can fit twice as man= y possible 'values' in your cache than in amd64 mode. Also, types of long are the same length as pointers and "int"s in ia32, while only long and pointer= s are the same length in amd64. So you're amd64 vs. ia32 code in many cases can be longer and less cache-nice. These considerations need to be taken into account when analyzing performance benchmarks. I agree with Peter though, regarding the i386 static build. Try that and se= e how it fares. My expectation is that the numbers will still be slightly under for the amd64 case, but I could be wrong.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?346a80220603160852u591a2d47p7031409c1d93bfc0>