From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,f9dc4c274aad13e4 X-Google-Attributes: gid111c93,public From: Alex Rhomberg Subject: Re: Why is our Alpha box so slow? Date: 1998/08/06 Message-ID: <35C9C99F.A2EA7176@ife.ee.ethz.ch>#1/1 X-Deja-AN: 378535709 Content-Transfer-Encoding: 7bit References: <6pv2mq$17v$1@mips.rhein-neckar.de> <6q55em$a58$1@mips.rhein-neckar.de> Content-Type: text/plain; charset=us-ascii X-Trace: 6 Aug 1998 17:19:58 +0100, 129.132.24.209 Organization: Electronics Lab, ETH Zurich, Switzerland MIME-Version: 1.0 Newsgroups: comp.os.linux.alpha Christian Weisgerber wrote: > > Some further details: > > Today I checked the hardware. The CPU clock is jumpered correctly to > 233MHz. There are eleven -1024-20 cache RAMs and the cache speed jumper > is set to the 20ns position. Looks okay to me. > > The box boots with MILO. It was originally shipped with a console for NT > but the flash ROM has since been overwritten with MILO. > > I'm told the machine needs about 2..3h to compile a kernel. I haven't > yet managed to build one, so I haven't verified this value. > > I have written a very simple program in an attempt to evaluate the > memory bandwidth of the machine. Yes, it's primitive, but I didn't have > a proper benchmark at hand. (Any pointers?) Basically all it does is run > through bytes of memory in a *p++ +=1 loop for 15s and count > iterations. You'd expect that if fits into the cache, there'll be > more iterations. > > On my Pentium-100, 256k PB cache (FreeBSD 2.2.7, gcc 2.7.2.1, -O3), I > get the expected result: > > 1k: 185500888 * > 2k: 185921817 * 8k 1st level cache > 4k: 186118297 * > 8k: 184412946 * > 16k: 158454103 . > 32k: 158543035 . > 64k: 158442354 . 256k 2nd level cache > 128k: 158063623 . > 256k: 157281569 . > 512k: 123673105 > 1024k: 123498417 main memory > 2048k: 123463409 > 4096k: 123659481 > > The result on the Alpha box (Red Hat 5.1, 2.0.33, egcs-2.90.29, -O3) is > bizarre: > > 1k: 149679693 * > 2k: 149316456 * 8k 1st level cache > 4k: 144773425 * > 8k: 144881972 * > 16k: 104659487 . > 32k: 104677115 . > 64k: 104652525 . > 128k: 104110833 . huh!? we have 1M > 256k: 56204479 of 2nd level cache > 512k: 40814057 > 1024k: 32698979 > 2048k: 26571787 continuously getting slower!? > 4096k: 24232887 You might want to replace the printf at the end with this: printf("%4d kWord (%5d kByte): %12ld (%4ld MByte/s)\n", i/1024, i*sizeof(WORD)/1024, count, count*sizeof(WORD)/RUNTIME/1000/1000); The output of this makes the same numbers than before less bizarre :) The performance declines when you hit the 128kWord (=1MByte) cache size. This explanation is probably a little bit simpler than the one about cache colouring, though when I like at my results, he still has some points :) For comparison the output of my PWS500: 1 kWord ( 8 kByte): 824218968 ( 439 MByte/s) 2 kWord ( 16 kByte): 824224447 ( 439 MByte/s) 4 kWord ( 32 kByte): 812589096 ( 433 MByte/s) 8 kWord ( 64 kByte): 816114182 ( 435 MByte/s) (96 kByte 2nd Level) 16 kWord ( 128 kByte): 691893296 ( 369 MByte/s) 32 kWord ( 256 kByte): 691897996 ( 369 MByte/s) 64 kWord ( 512 kByte): 688360238 ( 367 MByte/s) 128 kWord ( 1024 kByte): 587383787 ( 313 MByte/s) 256 kWord ( 2048 kByte): 476236828 ( 253 MByte/s) (The end of 2M 3rd level) 512 kWord ( 4096 kByte): 453027348 ( 241 MByte/s) 1024 kWord ( 8192 kByte): 395769889 ( 211 MByte/s) 2048 kWord (16384 kByte): 337396159 ( 179 MByte/s) 4096 kWord (32768 kByte): 285814847 ( 152 MByte/s) Regards Alex -- _________________________________________________________________ / \ | Alex Rhomberg Tel: +41 1 632 49 18 | | Institut fuer Elektronik Fax: +41 1 632 12 10 | | ETH Zuerich Zentrale: +41 1 632 11 11 | | Gloriastrasse 35 | | 8092 Zuerich email: rhomberg@ife.ee.ethz.ch | \_________________________________________________________________/