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: Robert Harley Subject: Re: Why is our Alpha box so slow? Date: 1998/08/04 Message-ID: #1/1 X-Deja-AN: 377785888 Content-Transfer-Encoding: 8bit References: <6pv2mq$17v$1@mips.rhein-neckar.de> <6q55em$a58$1@mips.rhein-neckar.de> <6q6e4j$8c3$1@palladium.transmeta.com> Content-Type: text/plain; charset=iso-8859-1 Organization: I.N.R.I.A Rocquencourt Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha Christian Weisgerber wrote: > >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 Here's what I got on two successive runs of your program on a PWS 500 (8K L1, 96K L2, 2M L3, 256M SDRAM) with kernel 2.0.35, egcs 1.0.3: 1k: 1062232512 1062755612 2k: 1061531391 1062338573 4k: 1039505016 1039862386 8k: 1047222456 1048294159 16k: 863710769 743501714 * 32k: 863224039 797739799 * 64k: 841381958 806677243 * 128k: 684417939 673839756 256k: 593329490 554701343 512k: 480981009 474114026 1024k: 394247431 401512977 2048k: 341795519 344795247 4096k: 302455587 306442743 8192k: 288015508 287996488 16384k: 286349351 285664343 32768k: 286640067 286410847 65536k: 287788687 287938399 131072k: 290794815 290588750 You can see definite plateaux for L1 and L2, then a graceful degradation that flattens out at sizes much larger than L3. The drop-off in your figures does seem to start too early for a 1M cache. It looks more like 256K to me. Other than that the shape looks right; the drop-off is severe because you have a model that's well known to have really slow main memory! torvalds@transmeta.com (Linus Torvalds) writes: > You may have 1MB of L2 cache, but it's direct-mapped and physical, and > Linux (for good reasons) doesn't try to colour it. So depending on how > your physical pages get spread out in memory you can't cache it all. I really wish that Linux did page colouring. For sizes between L1 and L2, there are often variations like on the starred lines above. I'm optimising some routines for arithmetic on big polynomials which get broken down into pieces of this size, typically. Trying to optimise in the face of random uncontrollable variations in timing is difficult to say the least! Bye, Rob. __ . . ' . . . ' * /\ \ . . . . . + . ____/_ \ \____ .-. .-. __ . * . . + . . . /______\ \ \ /\/ \/ \ .-. __/ \________________________________ \ _____\ \/ / / /\ \/ \__/ \__/ \ \/ / / \/ / / / \ /\ / \__/ \__ Robert.Harley@inria.fr \ / / /\__/_/_/\ / `-' \ \__/ \__/ \______________________________/ / / /\ \_______\_' `-' \__/ \__/ . . + \/__\ \ \______/ \__/ . . + .+. . \ \ / . . + . . . . . \_\/