Joker114w and CPU Temperatures

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
mhalstern
Posts: 484
Joined: Wed Nov 18, 2009 12:09 am

Joker114w and CPU Temperatures

Post by mhalstern » Mon Jan 11, 2010 10:30 pm

This is very interesting.

On my I7-920 running at stock speed, quad core engines get my cpu to between 44 and 49 degrees celcius. Single core engines get it between 41 and 42 degrees celcius. Joker 114w (single core) consistently gets my cpu to 45 degrees celcius!

Is this an example of efficient programming, getting the most out of a core?

I'm curious as to what causes the extra heat?

Thanks

bob
Posts: 20916
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Joker114w and CPU Temperatures

Post by bob » Mon Jan 11, 2010 10:36 pm

mhalstern wrote:This is very interesting.

On my I7-920 running at stock speed, quad core engines get my cpu to between 44 and 49 degrees celcius. Single core engines get it between 41 and 42 degrees celcius. Joker 114w (single core) consistently gets my cpu to 45 degrees celcius!

Is this an example of efficient programming, getting the most out of a core?

I'm curious as to what causes the extra heat?

Thanks
I doubt it means anything at all. I've run an i7 up to right at 100c when testing a prototype dual-chip 8 total cores.

User avatar
hgm
Posts: 24731
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Joker114w and CPU Temperatures

Post by hgm » Tue Jan 12, 2010 9:12 am

Joker was designed to run almost exclusively from the level-I cache. So it is very wel possible that it has much fewer pipe-line stalls due to waiting for memory data than typical engine code. And pipe-line stalls save power.

User avatar
Kempelen
Posts: 620
Joined: Fri Feb 08, 2008 9:44 am
Location: Madrid - Spain
Contact:

Re: Joker114w and CPU Temperatures

Post by Kempelen » Tue Jan 12, 2010 11:08 am

hgm wrote:Joker was designed to run almost exclusively from the level-I cache. So it is very wel possible that it has much fewer pipe-line stalls due to waiting for memory data than typical engine code. And pipe-line stalls save power.
How exactly is the way to design that way? I have searched in internet for the guidelines which apply, but have not found anything. All I have found is about code speed and performance, but not for designed application that way.... maybe is it described in any book??
Fermin Serrano
Author of 'Rodin' engine
http://sites.google.com/site/clonfsp/

mathmoi
Posts: 267
Joined: Mon Mar 13, 2006 4:23 pm
Location: Québec
Contact:

Re: Joker114w and CPU Temperatures

Post by mathmoi » Tue Jan 12, 2010 1:44 pm

Kempelen wrote:
hgm wrote:Joker was designed to run almost exclusively from the level-I cache. So it is very wel possible that it has much fewer pipe-line stalls due to waiting for memory data than typical engine code. And pipe-line stalls save power.
How exactly is the way to design that way? I have searched in internet for the guidelines which apply, but have not found anything. All I have found is about code speed and performance, but not for designed application that way.... maybe is it described in any book??
You simply need to reduce your total memory footprint. If your memory footprint is smaller than the cache your will never (not really never, but let say) have cache miss.

You need to be careful about you tables (Transposition tables, precalculations, magic tables, etc.) size and your code size (your application need to fit in the cache too).

Most of the time you can't really fit all you program in cache size. In this case it's till important to reduce your memory footprint to minimize the number of cache miss.

User avatar
hgm
Posts: 24731
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Joker114w and CPU Temperatures

Post by hgm » Tue Jan 12, 2010 3:48 pm

Small memory footprint is indeed a requirement. In addition I laid out the global data that was important for the search by putting it all in one struct, so that it is allocated contiguously, and cannot give accidental cache collisions.

edwardyu
Posts: 34
Joined: Mon Nov 17, 2008 5:58 am

Re: Joker114w and CPU Temperatures

Post by edwardyu » Tue Jan 12, 2010 5:09 pm

Is there any difference if I initialize a table as
table[n]={v, v, v, ..., };
instead of pre-calculate the table contents in an initialization function?
Which one has less memory and faster?

mathmoi
Posts: 267
Joined: Mon Mar 13, 2006 4:23 pm
Location: Québec
Contact:

Re: Joker114w and CPU Temperatures

Post by mathmoi » Tue Jan 12, 2010 5:24 pm

edwardyu wrote:Is there any difference if I initialize a table as
table[n]={v, v, v, ..., };
instead of pre-calculate the table contents in an initialization function?
Which one has less memory and faster?
It depends on what is in the table and how much it cost to pre-calculate. However it's not really relevant, since it's only executed once at the start of the engine. It's not important for the core part of your engine that is the search.

What is important is to fit in cache (or fit as much as possible) all the memory used by your search. This is the board representation, all the stack variables of the search, the search code itself, any pre-calculation used during the search (this include move generation/execution/evaluation). If most of it fit in the cache, it will be loaded when the search start and will stay there, limiting the cache miss (as you probably know a cache miss is when a page is not in the cache and need to be retrieved from main memory). This is usually an order of magnitude slower than a cache access. Things like the TT will obviously not fit in the cache, But they're still usefull since they allow you to skip whole tree branches. One thing you can do regarding the TT and the cache is make sure that every cache entry do not overlap on two cache page. So every TT probe will only generate one cache miss at most.

bob
Posts: 20916
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Joker114w and CPU Temperatures

Post by bob » Tue Jan 12, 2010 5:24 pm

edwardyu wrote:Is there any difference if I initialize a table as
table[n]={v, v, v, ..., };
instead of pre-calculate the table contents in an initialization function?
Which one has less memory and faster?
Compile-time initialization will use less memory as you won't need the instructions to initialize at run-time. Other than that, there is no difference whatsoever. Initializing at compile time will make the binary file larger. Which might be a pain for very large arrays. But otherwise, it's effectively irrelevant as to which approach you choose. I prefer compile-time whenever possible.

User avatar
Graham Banks
Posts: 34380
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: Joker114w and CPU Temperatures

Post by Graham Banks » Tue Jan 12, 2010 7:06 pm

mhalstern wrote:This is very interesting.

On my I7-920 running at stock speed, quad core engines get my cpu to between 44 and 49 degrees celcius. Single core engines get it between 41 and 42 degrees celcius. Joker 114w (single core) consistently gets my cpu to 45 degrees celcius!

Is this an example of efficient programming, getting the most out of a core?

I'm curious as to what causes the extra heat?

Thanks
I have seen similar behaviour with some engines.
Zappa springs immediately to mind. When it was one of two engines running, the cpu temp was always a few degrees higher than when other engines were playing.

Cheers,
Graham.
gbanksnz at gmail.com

Post Reply