Subject: processor specific optimization and kernel benchmarking
To: None <tech-perform@netbsd.org>
From: Erik E. Fair <fair@netbsd.org>
List: tech-perform
Date: 05/09/2005 18:10:17
NetBSD ships binaries compiled for the minimum subset ISA of each
platform. This is sensible for us - it means our distribution is
of minimum size, and we avoid a nasty MxN explosion of builds at
release time, as well as keeping the system installation and
configuration simple.

However, the later versions of GCC that we're now using seem to
have better per-processor instruction scheduling and optimization
(not to mention ISA additions like BWX (Alpha), MMX/SSE/SSE2 (i386),
AltiVec (PPC)), which might win on later model processors (e.g.
PPC G4 (74xx) versus PPC 603/604; Pentium III versus i80386; Alpha
21264 versus 21064), if one were to recompile the kernel and userland
with processor optimization options to match the processor one has.

We've made this relatively easy to do with CPUFLAGS in /etc/mk.conf
and the appropriate "makeoptions" line in config(8), but what I'm
wondering is how we can measure the difference this makes? What
benchmarks would show more efficient use of the processor at hand
by a kernel and userland that were compiled with processor specific
optimizations?

I also note that the NetBSD Guide does not mention this issue in
its tuning section.

	Erik <fair@netbsd.org>