All times are UTC+01:00




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sat Aug 23, 2014 7:12 pm 
User avatar

Joined: Wed Aug 20, 2014 9:32 am
Posts: 231
Location: Poland
Some time ago, when I fiddled with Windows 7, I noticed strange behaviour of threads in this OS. On multithreaded processors (or multicore processors), when you load only 1 thread, it seems to jump, using all of the available cores or threads. This was not the case when using Windows XP. I tried it numerous times with 64-bit and 32-bit versions of Windows 7 Home Premium and Professional, and even Windows 8.1 Update 1, as well as multiple processors from Intel and AMD and always got similar results.

You can try it for yourself - use prime95 or OCCT and try to load only 1 thread - it will not stick to one of the processor's threads or cores - it will jump all around the cores, only occasionally loading one of them significantly (it works also for 2, 3 threads etc).

When I did that on Windows XP, I was able to assign thread to a specific core. I didn't manage to do that in Windows 7 or Windows 8. For me it looks like a bug in the OS scheduler. It might possibly impact a performance of multicore CPUs, as you want to keep threads separate and not merged, especially when software, such as ST, uses only 2 threads of 4 or even 8 available. Maybe it could also affect usage of multiple instancies of ST.

Can someone comment on that?

Regards,
Slawomir.


Top
   
PostPosted: Sun Sep 28, 2014 4:50 pm 
User avatar

Joined: Fri Jun 27, 2014 4:20 pm
Posts: 211
CONFIRMED. I have exactly the same problem...

_________________
Very proud user of Stereo Tool since 2010. Thanks Hans.

My radio station
http://amradio.ddns.net


Top
   
PostPosted: Sun Sep 28, 2014 7:45 pm 
User avatar

Joined: Tue Mar 17, 2009 2:56 pm
Posts: 4151
That windows tries to be smart and trying to spread power over cores.

Once i asked Hans to make table in ST for that. W7 and (i think) W8 uses same hex table to determine what cores/threads you want to use.
Since ST uses 2 cores. in table like that you can select what cores you want to use.

For example. ST1 uses 1st and 2nd core out of 4, ST2 uses 3rd and 4th core.

You can also do that now.
Make shortcut (make new txt file and rename it to something.bat and put it in ST folder) for ST wich will have this line..
start /affinity c0 StereoTool.exe
This example is for to run stereotool.exe on 1st and 2nd core out of 8 cores.

How to find what to put instead "c0"

Go here, http://www.mathsisfun.com/binary-decima ... erter.html
In binary tab type "0" or "1" - for example if you have 4 cores and you want program to run on core 1 and 2 you should put "1100", wich gives hexadecimal result of "C". So line in bat file will be
start /affinity c StereoTool.exe


Top
   
PostPosted: Mon Sep 29, 2014 5:01 pm 
Site Admin
User avatar

Joined: Mon Mar 17, 2008 1:40 am
Posts: 11185
Next version will have core affinity settings built-in!


Top
   
PostPosted: Mon Sep 29, 2014 5:04 pm 
User avatar

Joined: Fri Jun 27, 2014 4:20 pm
Posts: 211
Great.......

_________________
Very proud user of Stereo Tool since 2010. Thanks Hans.

My radio station
http://amradio.ddns.net


Top
   
PostPosted: Mon Sep 29, 2014 9:22 pm 
User avatar

Joined: Tue Mar 17, 2009 2:56 pm
Posts: 4151
ok great.

However, what if i have 4 cores and 8 threads?
In table it should be shown as 8 but what to use. 2 threads or 2 cores witch is 4 threads.

I don't have such CPU to test that.


Top
   
PostPosted: Mon Sep 29, 2014 10:29 pm 
User avatar

Joined: Wed Aug 20, 2014 9:32 am
Posts: 231
Location: Poland
Quote:
That windows tries to be smart and trying to spread power over cores.

Once i asked Hans to make table in ST for that. W7 and (i think) W8 uses same hex table to determine what cores/threads you want to use.
Since ST uses 2 cores. in table like that you can select what cores you want to use.

For example. ST1 uses 1st and 2nd core out of 4, ST2 uses 3rd and 4th core.

You can also do that now.
Make shortcut (make new txt file and rename it to something.bat and put it in ST folder) for ST wich will have this line..
start /affinity c0 StereoTool.exe
This example is for to run stereotool.exe on 1st and 2nd core out of 8 cores.

How to find what to put instead "c0"

Go here, http://www.mathsisfun.com/binary-decima ... erter.html
In binary tab type "0" or "1" - for example if you have 4 cores and you want program to run on core 1 and 2 you should put "1100", wich gives hexadecimal result of "C". So line in bat file will be
start /affinity c StereoTool.exe
Good to know, will try this later :) I have hyperthreaded CPUs so I can try it, but my personal opinion is that Windows recognizes the cores and their hyperthreads, at least in Intel CPUs. Look at those:

http://i.imgur.com/Q2hY7sX.jpg - CPU usage ST, with main window visible (7.24)
http://i.imgur.com/JqriBzE.jpg - CPU usage, ST with main window hidden (7.24)

See the difference? Two main threads are visible as odd threads. While the second one looks like thread occupied by GUI (but I might be wrong). This is dual core, hyperthreaded (i5-3210m).

On the other hand, AMDs implementation of simultaneous multithreading is different: AMD FXes (Bulldozer, Piledriver) are modular, so that 8 core CPU, truly has 4 modules and 8 "cores", 2 of them per 1 module. Why "cores"? Because they share one FPU, so they are not full cores really. Windows is not aware of that the chip can effectively utilize only 4 out of 8 cores in total, when loaded with FPU hungry calculations. It happens that Windows assigns 8 FPU calculations (instead of 4) completely randomly, thus blocking the chip with FPU data.

That's why I sold this chip.


Top
   
PostPosted: Sun Oct 05, 2014 12:46 pm 
User avatar

Joined: Fri Jun 27, 2014 4:20 pm
Posts: 211
BTW I am testing windows 10 and the affinity problem seems to have been fixed.

_________________
Very proud user of Stereo Tool since 2010. Thanks Hans.

My radio station
http://amradio.ddns.net


Top
   
PostPosted: Thu Mar 26, 2015 2:11 pm 

Joined: Tue Mar 10, 2015 9:03 pm
Posts: 227
Location: Utah, USA
Quote:
Next version will have core affinity settings built-in!
I know this goes back aways... But is there a way in Windows to see what all is using a specific core? The Task Manager is not detailed enough to show which process is using which core.

_________________
America's Country
Three Decades of Country!


Top
   
PostPosted: Tue Apr 07, 2015 2:30 pm 
User avatar

Joined: Wed Aug 20, 2014 9:32 am
Posts: 231
Location: Poland
In Windows 8 you can have heatmaps for this:

http://superuser.com/questions/493827/w ... graph-only


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 10 posts ] 

All times are UTC+01:00


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited