stockfish and number of cores

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

lkaufman
Posts: 6284
Joined: Sun Jan 10, 2010 6:15 am
Location: Maryland USA
Full name: Larry Kaufman

stockfish and number of cores

Post by lkaufman »

When I ran the new Stockfish 1.7 on an old quad, it reported the number of cores as 2, whereas older versions reported 4. So I did some checking, and I discovered that the older version is much faster with cores limited to 2 than with the setting at 4! So my questions are:
1. Is there something seriously wrong with this computer, based solely on this information? Any idea what the problem with it could be?
2. Is this behavior specific to Stockfish, or should I expect any MP chess program to run better with two cores set than with four, on this specific machine?

Thanks.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: stockfish and number of cores

Post by mcostalba »

lkaufman wrote:When I ran the new Stockfish 1.7 on an old quad, it reported the number of cores as 2, whereas older versions reported 4. So I did some checking, and I discovered that the older version is much faster with cores limited to 2 than with the setting at 4! So my questions are:
1. Is there something seriously wrong with this computer, based solely on this information? Any idea what the problem with it could be?
2. Is this behavior specific to Stockfish, or should I expect any MP chess program to run better with two cores set than with four, on this specific machine?

Thanks.
Probably you have HT enabled and so your old QUAD actually is a DUAL (sorry for revealing you this ;-) ).

SF, but also all the SMP engines, works best when the number of cores used matches the _real_ one, not the hyper threading inflated (doubled) one.

In your case I would say that the new HT detection code worked as expected (see my last post on Stockfish 1.7 thread).
lkaufman
Posts: 6284
Joined: Sun Jan 10, 2010 6:15 am
Location: Maryland USA
Full name: Larry Kaufman

Re: stockfish and number of cores

Post by lkaufman »

No, it's definitely a quad (QX6700), but it seems to be acting strangely. Could it be that something was running in the background unknown to me that tied up one or two cores? I have rebooted so I can't check this, but I could redo the test to see if I still get a speedup by using only two cores.
User avatar
M ANSARI
Posts: 3734
Joined: Thu Mar 16, 2006 7:10 pm

Re: stockfish and number of cores

Post by M ANSARI »

I can also confirm that there is a problem with CPU setting. It first defaulted to 4 cores on my Octa, then I forced 8 threads and noticed that on the F12 GUI it went back to 5 CPU's for some reason. I then removed the engine and re-installed it and made sure that 8 cores are running ... but it crashes horribly when I put it in a tourney. I re-tested the same hardware with R3 vs. ZM II and no crashes for 100 game tourney so I am pretty sure it is related to SF 1.7 and its 8 CPU implementation. Not sure what it is exactly, but maybe by forcing 8 threads some other parameter needs adjustment?
User avatar
M ANSARI
Posts: 3734
Joined: Thu Mar 16, 2006 7:10 pm

Re: stockfish and number of cores

Post by M ANSARI »

Actually it seems that there is some incompatibility with F12 GUI with regards to the CPU's. It shows as 5 CPU's in the GUI but in task manager SF1.7 is clearly running all 8 cores. I have increased the split depth to 6 as recommend in the readme file and will try a tourney with these settings to see how it goes.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: stockfish and number of cores

Post by zullil »

M ANSARI wrote:Actually it seems that there is some incompatibility with F12 GUI with regards to the CPU's. It shows as 5 CPU's in the GUI but in task manager SF1.7 is clearly running all 8 cores. I have increased the split depth to 6 as recommend in the readme file and will try a tourney with these settings to see how it goes.
If SF detects 8 cores, it will set the default value of minimum split depth to 7. Extensive testing indicated that this is an optimal value, though 6 is also quite good (and perhaps is even better than 7 on your hardware).
Albert Silver
Posts: 3026
Joined: Wed Mar 08, 2006 9:57 pm
Location: Rio de Janeiro, Brazil

Re: stockfish and number of cores

Post by Albert Silver »

M ANSARI wrote:Actually it seems that there is some incompatibility with F12 GUI with regards to the CPU's. It shows as 5 CPU's in the GUI but in task manager SF1.7 is clearly running all 8 cores. I have increased the split depth to 6 as recommend in the readme file and will try a tourney with these settings to see how it goes.
This isn't new. When I tested 1.6.3 in F12 and set it to SP, F12 still showed 2 CPUs yet the task manager confirmed SF was only using one.
"Tactics are the bricks and sticks that make up a game, but positional play is the architectural blueprint."
ernest
Posts: 2053
Joined: Wed Mar 08, 2006 8:30 pm

Re: stockfish and number of cores

Post by ernest »

M ANSARI wrote:I have increased the split depth to 6 as recommend in the readme file .
The same recommendation exists in the readme file since version 1.5 :o