Subject: good old 604e and perfomance issues
To: netbsd-macppc <port-macppc@NetBSD.ORG>
From: Riccardo Mottola <rollei@tiscalinet.it>
List: port-macppc
Date: 06/24/2005 15:57:27
Hey all!

my 9500 go an upgrade bump. That is a G4 card... Of course the
engineering curiosity was to benchmark "before and after". ANd I used my
typical matmul and fft benchmarks, I just made then a bit bigger so they
run longer.
The result? the 604e 200Mhz is damn fast :)

NetBSD reports the g4 to run at 400Mhz, macos 8.6 reports an unkown
processor at 450Mhz and I alm almost sure the card is a 450 or a 500mhz.
(got it used, so no box, sorry). It should have a 1Mb cache but netbsd
doesn't report it. Maybe it is correct for backside caches? (the 604ev
card does the same in the 9600)

cpu0 at mainbus0: 7400 (Revision 2.7), ID 0 (primary)
cpu0: HID0 8294c0a4<EMCP,ECLK,DOZE,DPM,EIEC,ICE,DCE,SGE,BTIC,BHT>
cpu0: 409.10 MHz


here are my results.
I compiled -O2, -O3 and -O2 with the cpu model (-mcpu=604 or 7400). then
I did also -O2 -mcpu=7400 -m-no-altivec (and -maltivec) just to go on
the safe side.

benchmarks

NetBSD 2, gcc 3.3.3

ppc 604e, 200Mhz, 512K cache on board

matmul-double
-O2            2.38
-O3            2.42
-O2 -mcpu=604  2.33

matmul-float
-O2            2.01
-O3            2.14
-O2 -mcpu=604  1.59

fft
-O2            0.10.89
-O3            0.10.69
-O2 -mcpu=604  0.7.55


ppc 7400, 410Mhz (?), 

matmul-double
-O2            2.41
-O3            2.50
-O2 -mcpu=7400 2.35
same (no-alti) 3.01
(altivec)      2.38

matmul-float
-O2            0.29.89
-O3            0.30.18
-O2 -mcpu=7400 0.27.95
same (no-alti) 0.28.99
(altivec)      0.30.11

fft
-O2            0.5.99
-O3            0.6.05
-O2 -mcpu=7400 0.6.85
same (no-alti) 0.6.23
(altivec)      0.6.17

not exacly exciting, right?
matmul have in memroy 3 matrix of 160x160 elements thus they should fit
at least in the 1Mbyte cache. also in the 5125 K cache on-board for the
slower cpu. FFT should fit in an L2 cache too.
FFT uses double registers.

I gather that the G4 sucks at double, being only marginally faster than
the 604e which is clocked at half the cpu speed. float speed is indeed
faster. Altivec doesn't seem to affect my tests.

Can there be netbsd problems? netbsd related settings that affect cpu
performance? clockspeed? I have absolutely no experience wih cpu
upgrades and this is my one and only G4 :)

-R