Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Sempron vs. Athlon 64: Proof that Crafty's working set is < 256k

Author: Tom Kerrigan

Date: 13:13:31 08/20/04

Go up one level in this thread


On August 20, 2004 at 13:01:24, Robert Hyatt wrote:

>On August 20, 2004 at 11:51:27, Tom Kerrigan wrote:
>
>>On August 20, 2004 at 10:51:50, Robert Hyatt wrote:
>>
>>>On August 20, 2004 at 04:33:07, Tom Kerrigan wrote:
>>>
>>>>Now that AMD is selling two processors that are identical other than L2 cache
>>>>size (Sempron has 256k, Athlon 64 has 512k) we have proof of Crafty's working
>>>>set size:
>>>>
>>>>Sempron:    1,080,020 NPS
>>>>Athlon 64:  1,080,230 NPS
>>>>
>>>>http://www.anandtech.com/linux/showdoc.aspx?i=2170&p=3
>>>>
>>>>This should prove once and for all that Crafty's working set is < 256k and
>>>>therefore that size of L2 cache has no effect on its performance (as long as
>>>>it's >= 256k) and that main memory speed likely plays a trivial role
>>>>performance-wise.
>>>>
>>>>I bring this up because of all of the long debates that have occurred in the
>>>>past about the value of L2 cache, the speed of memory, and the working set size
>>>>of chess programs.
>>>>
>>>>I have no doubt that Crafty uses a bunch of memory, but obviously not with
>>>>enough temporal locality for it to matter one iota.
>>>>
>>>>-Tom
>>>
>>>
>>>Your interpretation _could_ be seriously flawed.  IE suppose its working set is
>>>2mb?  You can't conclude anything if that is true as both the 256K and 512K
>>>would be thrashing equally.
>>
>>How is it they would by thrashing equally? Let's say a cache access takes 5ns
>>and main memory takes 50ns. Average access times for 2MB working set:
>
>Simple.  Take an array of 1.9 megabytes, plus the code to loop over the array
>sequentially, over and over.
>
>your 256kb cache will be just as fast as the 512K cache as you are getting no
>data reuse at all.  But once you hit 2mb, it all fits in cache and runs much
>faster...
>>
>>That's 15% faster. You'd think a difference that big would show up in the
>>benchmark score but it doesn't. Or are you going to claim that Crafty always
>>uses memory that it hasn't used for the last ~512k?
>
>I am not going to claim anything other than that your claim is flawed, because
>there is a simple example of where it fails given above.

Not only simple, but overly simple. Just because you can think of a program with
a completely contrived access pattern doesn't mean every program might have that
contrived pattern. If you put any thought into it at all, you'd realize (admit)
that visiting and evaluating similar positions means frequently accessing the
same data... not looping through a 2MB array.

>of cache frequently.  On the xeons, I saw improvement from 512 to 1024 to 2048.
>But that was at least 3-4 years ago when I benchmarked Crafty before buying my
>first quad xeon box.  Whether I have changed that or not is anybody's guess as
>the program has seen marked changes, from move generation (no more
>COMPACT_ATTACKS) to less shared data for NUMA boxes.

Ah, so, some qualification, in case I run the experiment and get different
results. How about you send me the version of Crafty that showed an improvement
from 512k to 1024k?

>>I have easy access to 2GHz Athlon 64s with 512k and 1MB cache... if somebody can
>>point me to a Windows Crafty executable and tell me what to type, I'll happily
>
>Best way to compare is to simply start the crafty executable in a directory with
>nothing else in it, and type "bench".  That runs with a small hash table and
>everything else, and will report the NPS after running 6 test positions...

Okay, but that doesn't answer a key part of my question, namely where is a
Windows Crafty executable?

-Tom



This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.