Some Notes about Hyper-Threading

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

Moderator: Ras

Sedat Canbaz
Posts: 3018
Joined: Thu Mar 09, 2006 11:58 am
Location: Antalya/Turkey

Re: Some Notes about Hyper-Threading

Post by Sedat Canbaz »

diep wrote:
Speaking is silver, testing is gold.

i5 has less memory channels than i7. 2 versus 3, so i5 is a lot worse than i7.

for diep HT works magnificent, and when overclocking a cpu to 4.5Ghz or so it works even better, just like hiarcs team also reported they turned on HT for hiarcs on the overclocked 12 core @ 24 logical core box. 4.65ghz or so overclocked during tournament?

At those speeds HT gives for diep 30% or so. At 3.xGhz it's more like 20%.

And yes - it does search deeper.

By the way you can also see it in testresults from Lostcircuits how bad i5 is.

At 3.7Ghz (turboboost) it's 1.0M nps versus C2Q doing better there if you extrapolate its speed.

http://www.lostcircuits.com/mambo//inde ... itstart=16

Of course the gulftown and sandy-bridge 6-core cpu's total dominate, as they have 50% more cores and in case of sandy bridge 4 memory channels.

But that's another story...

Dear Vincent,

Honestly i am surprised ...
I did not know that about there is any chess engine with HT ON,where its chess speed performance to be better than HT OFF ?!

So...Diep with HT ON has better performance than Diep with HT OFF ?
Can you confirm with HT data (testings,games,benchmarks...) please ?

In my testings,its quite clear that Houdini 2.0c with HT OFF performs much better than Houdini 2.0c with HT ON
Just i'd like to mention and confirm again that Houdini 2.0c with HT ON is much slower in solving the mates than Houdini 2.0 HT OFF

I have no Diep chess engine and i can not check it,thats why its will be great if you inform us about:

1)Have you tested both systems between each other in Auto232 mode (i mean Diep HT ON against Diep HT OFF) ?

2) If you have already a such useful HT Auto232 Test:what is the ELO difference between HT ON and HT OFF ??

If you have no HT Auto232 test (still you did not test them to play against each other),then you can not be sure !!

The higher kns values dont mean that HT ON is faster or better
In other words: the most important is the Chess Speed-ELO Performance (not higher kns values)


So...in my opinion,the best way to measure which system is better for chess:
-HT OFF and HT ON should be played against each other in Auto232 mode (on two identical separate machines)
1) PC A (Hyper Threading ON-enabled from bios)
2)PC B (Hyper Threading OFF-disabled from bios)

Note:for the Hyper-Threading test should be used same neutral book and same chess engine

One thing more,actually i see a lot of comments here...but unfortunately no any useful data (exception my HT ON /HT OFF mate benchmarks)

Come on dear Friends,

Is anybody have any serious data for the current HT issue
But next time please no more comments,i prefer to see HT testings,HT games,HT benchmarks...


BTW,another notes by Robert Houdart about Hyper-Threading:

Houdini 2 will automatically limit the number of threads to the number of logical processors of your hardware.
If your computer supports hyper-threading it is recommended not using more threads than physical cores,
as the extra hyper-threads would usually degrade the performance of the engine.

Q: I'm running Houdini on a Core i7 CPU with hyper-threading. Would you recommend to use hyper-threading with Houdini?

The architecture of Houdini (and of chess engines in general) is not very well suited for hyper-threading;
using more threads than physical cores will usually degrade the performance of the engine.
Although the hyper-threads often produce a slightly higher node speed, the increased inefficiency
of the parallel alpha-beta search more than offsets the speed gain obtained with the additional hyper-threads.
To give a practical example, it's more efficient to use 4 threads running at 2,000 kN/s each than 8 threads
running at 1,100 kN/s each, although the latter situation produces a higher total node speed.

For this reason it's best to set the number of threads not higher than the number of physical cores of your hardware.


Best,
Sedat
noctiferus
Posts: 364
Joined: Sun Oct 04, 2009 1:27 pm
Location: Italy

Re: Some Notes about Hyper-Threading

Post by noctiferus »

Just to put here my 2 cents: I'm not fluent at all in this area (I'm a probabilist and a data miner), but I want to share here a bad result I had today.

I asked permission from Swami to go on with his STSuite results publication (whether anybody were interested in...), to check new engines' performance, permission that he very kindly gave me.

In order to establish a common baseline, I tested Houdini 1.5 32bit, adjusting test times to have, roughly, the same performance he had on his Q6600 2.4Ghz, 10 seconds/position (mine is a i7 q720 1.6 Ghz, HT ON).
Passmark performance eval gave 2983 for his machine, and 3294 for mine.
Well, in order to achieve the same success rate for Houd 1.5, I had to test it under 18 seconds/position, instead of the expected 9 secs/pos.
Trahald
Posts: 70
Joined: Tue Dec 23, 2008 12:26 pm
Location: Australia

Re: Some Notes about Hyper-Threading

Post by Trahald »

Looking at this thread I thought I would share the results of a tournament I ran recently, the idea was to find out the optimum number of threads to use on my main PC, using an i7 2600k with HT enabled (by default). OS is Windows 7 x64.

Ideally I would like to see how these results compare with HT disabled, but I guess I cannot do that directly without a second identical PC.

I used Critter 1.2 engine for this test, with 4, 7 and 8 threads.
Shredder GUI
Time control was 1 minute + 3sec/move
Ponder off
256mb hash
5 man Gaviota tablebases
Perfect 2012 book

Code: Select all

										1					2					3	
1	Critter 1.2 [x4][P]		**				 103.0 - 97.0	107.5 - 92.5			210.5/400
2	Critter 1.2 [x7][P]		97.0 - 103.0	**				 100.5 - 99.5			197.5/400
3	Critter 1.2 [x8][P]		92.5 - 107.5	99.5 - 100.5	**						 192.0/400
Probably I will run a similar test with Houdini soon. Perhaps more games are required, but it suggests to me that for Critter at least, with HT enabled, it is best to use one thread for each physical core. This seems to be the general opinion from what I have read, although I wanted to test that for myself.

I'm just left wondering whether i could expect any significant difference between leaving HT on and just using one thread per core, or disabling HT? I would have expected to see a small but insignificant difference, but the test results from Sedat, particularly the mate search test, seems quite startling. Thoughts here would be welcome.

I'm happy to make the games of my Critter tournament available if anyone is interested.
Russell Murray
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Some Notes about Hyper-Threading

Post by wgarvin »

Trahald wrote:I'm just left wondering whether i could expect any significant difference between leaving HT on and just using one thread per core, or disabling HT? I would have expected to see a small but insignificant difference, but the test results from Sedat, particularly the mate search test, seems quite startling. Thoughts here would be welcome.
One big issue here, is whether your operating system understands how to schedule threads properly for a hyperthreaded processor or not. From Sedat's screenshots, I'm guessing he is using Windows XP.

If you use Windows 7, its scheduler understands that putting two threads on the same physical core is not as good as putting each thread on its own physical core paired with nothing. But I don't know if the Windows XP scheduler was ever updated to handle this. (I read somewhere that the Windows 2000 scheduler wasn't, even though there were HT P4's back then). Even if the scheduler puts your 4 engine threads each on their own core, background processes might still be given timeslices on the "empty" half of one or more cores, slowing down the chess threads a bit.

Turning HT off in the bios will guarantee that your chess engine threads never have to share the resources of a physical core (particularly memory bandwidth and cache) with another thread. If you leave it on, there is no guarantee and you just have to hope your OS knows what its doing.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Some Notes about Hyper-Threading

Post by bob »

rodolfoleoni wrote:
bob wrote: Problem with HT on is that if you have 4 physical cores, and search X NPS, when you go to 8 cores (HT on) the tree will grow by 30%. If your NPS doesn't grow by MORE than 30%, you see a net loss.

NPS is NOT the way to measure parallel search performance. It provides completely bogus comparisons...
And here's my problem: I tried to disable HT but I didn't find any option in BIOS-Advanced. There's only an utility, "Easy Flash", and I should only use it to browse and find the BIOS file.... but I've no idea about where to search for it.

It's an Asus laptop, X53S series. Any guess?

Thanks in advance. :)
It is usually under 'CPU information." But it is often called something bizarre like "logical processor on/off" or such nonsense. That is what our Dell boxes had the last time I fooled with this. I no longer disable HT, I just make sure to use 1 thread per physical core and let the O/S (Linux in my case) make certain that each physical thread runs on its own physical core...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Some Notes about Hyper-Threading

Post by bob »

wgarvin wrote:
Trahald wrote:I'm just left wondering whether i could expect any significant difference between leaving HT on and just using one thread per core, or disabling HT? I would have expected to see a small but insignificant difference, but the test results from Sedat, particularly the mate search test, seems quite startling. Thoughts here would be welcome.
One big issue here, is whether your operating system understands how to schedule threads properly for a hyperthreaded processor or not. From Sedat's screenshots, I'm guessing he is using Windows XP.

If you use Windows 7, its scheduler understands that putting two threads on the same physical core is not as good as putting each thread on its own physical core paired with nothing. But I don't know if the Windows XP scheduler was ever updated to handle this. (I read somewhere that the Windows 2000 scheduler wasn't, even though there were HT P4's back then). Even if the scheduler puts your 4 engine threads each on their own core, background processes might still be given timeslices on the "empty" half of one or more cores, slowing down the chess threads a bit.

Turning HT off in the bios will guarantee that your chess engine threads never have to share the resources of a physical core (particularly memory bandwidth and cache) with another thread. If you leave it on, there is no guarantee and you just have to hope your OS knows what its doing.
One note. I found a version of linux that screwed up on non-power-of-two cores per chip (cores per package in Linux terminology). I ran on a dual cpu Nehalem with 6 cores per chip, and linux did NOT schedule it properly if I only ran 12 threads. This was fixed in other versions of Linux however, but be aware that when you get away from a power-of-2 cores per chip, simple O/S tricks to determine what is real and what is HT can fail...
ernest
Posts: 2053
Joined: Wed Mar 08, 2006 8:30 pm

Re: Some Notes about Hyper-Threading

Post by ernest »

Sedat Canbaz wrote:As far as i know you are owner of Intel Core 2 Duo E6600,which does not support HT
................................
Really i dont understand your goal...what is your problem with me
Dear my friend (?) Sedat,

Yes, I am using an Intel Core2 Duo 6600, which gives me a good knowledge of MP (multiprocessing).
Because that is the question I asked: how can a single MP test answer your HT investigation.

And your overinflated ego, as well as total lack of humor translated that into the paranoia we have seen you express on some occasions.

No Sedat, I am not being mean to you, I don't wish you any harm, I am just not one of the asslickers you love and thank so much.

So if you can, answer genuinely the question I asked, because it is adding value to your HT investigation.

Wishing you an enlightened continuation of your mission,

Ernest
User avatar
M ANSARI
Posts: 3726
Joined: Thu Mar 16, 2006 7:10 pm

Re: Some Notes about Hyper-Threading

Post by M ANSARI »

I think a critical thing with HT is the OS. Win 7 is much better at dealing with HT than win XP. I would think that HT can be beneficial if the OS handles the threads properly and allocates resources as it should. HT threads can always be useful doing other non chess related stuff, and thus theoretically HT should help. The problem is that some OS's simply do not allocate the resources properly and thus you have increased latencies that would hurt rather than help performance. But if your setup with your OS is absolutely perfect and all affinities to the engine are properly resourced, then you would see a tiny increase in performance ... I mean really tiny.
Sedat Canbaz
Posts: 3018
Joined: Thu Mar 09, 2006 11:58 am
Location: Antalya/Turkey

Re: Some Notes about Hyper-Threading

Post by Sedat Canbaz »

ernest wrote:
Sedat Canbaz wrote:As far as i know you are owner of Intel Core 2 Duo E6600,which does not support HT
................................
Really i dont understand your goal...what is your problem with me
Dear my friend (?) Sedat,

Yes, I am using an Intel Core2 Duo 6600, which gives me a good knowledge of MP (multiprocessing).
Because that is the question I asked: how can a single MP test answer your HT investigation.

And your overinflated ego, as well as total lack of humor translated that into the paranoia we have seen you express on some occasions.

No Sedat, I am not being mean to you, I don't wish you any harm, I am just not one of the asslickers you love and thank so much.

So if you can, answer genuinely the question I asked, because it is adding value to your HT investigation.

Wishing you an enlightened continuation of your mission,

Ernest

I told you kindly that next to come with useful data or just to ignore my postings

And as i expected:again nothing,only bla,bla,bla....

Put a little bit efforts and post here please,where others chess friends can benefit from your work

But this is very hard for you,is not ? and you can't,its much easier to attack...is not ??

This is completely wrong,i have a lot of data about HT,i have a lot of played HT games...

But however,Who are you ?? Why i should give you more information,did you pay for something ?

Why especially in my works/lists,are you trying to find holes ?

Why are you making double standard ? what about rest lists, their works/lists are perfect/ideal for chess ?!

No...no...i am quite sure that you hate a lot of name the 'Sedat Canbaz',or maybe 'SedatChess' :) ??

But its ok i have thousands of SedatChess site Visitors...
Plus i receive hundreds of emails monthly....and that really makes me happy a lot too

Of course its very normal and i am not surprised too that there will be a few ones who will not like/hate my work

About my ego,my paranoia:
Hmm...well,go on,you are in the right way,but be more careful,there is possibility to make a accident !!

Look...there is no doubt that you are one of the people who are really very 'Jealous'

Who dont share nothing,exception negative statements !!

BTW,unfortunately there is no any treatment for 'Jealousy'

But anyway,maybe this song will be good for you:


One thing more,can you do a favor for me, it will be first and last:
-Please next time stay far away from me (its will be great)

Thanks in advance...

And last:dear Ernest,wishing you happiness, health and success for ever!

Your friend,
Sedat
rodolfoleoni
Posts: 263
Joined: Mon Nov 29, 2010 9:16 pm

Re: Some Notes about Hyper-Threading

Post by rodolfoleoni »

bob wrote:
rodolfoleoni wrote:
bob wrote: Problem with HT on is that if you have 4 physical cores, and search X NPS, when you go to 8 cores (HT on) the tree will grow by 30%. If your NPS doesn't grow by MORE than 30%, you see a net loss.

NPS is NOT the way to measure parallel search performance. It provides completely bogus comparisons...
And here's my problem: I tried to disable HT but I didn't find any option in BIOS-Advanced. There's only an utility, "Easy Flash", and I should only use it to browse and find the BIOS file.... but I've no idea about where to search for it.

It's an Asus laptop, X53S series. Any guess?

Thanks in advance. :)
It is usually under 'CPU information." But it is often called something bizarre like "logical processor on/off" or such nonsense. That is what our Dell boxes had the last time I fooled with this. I no longer disable HT, I just make sure to use 1 thread per physical core and let the O/S (Linux in my case) make certain that each physical thread runs on its own physical core...
Thanks! :)

As soon as the current test I'm running will be complete I'll try to disable HT again.

BTW, Crafty 23.4 is one of the sparring partners I always use to tune The Baron. Crafty seems to gain something in depth with HT enabled and 8 cores (ponder off), but I want to try it with 4 cores and HT disabled too. I think it'll run better.
Rodolfo (The Baron Team)