WyvernTKC / cpuminer-gr-avx2

Optimised Version of GR miner for RTM
GNU General Public License v2.0
371 stars 193 forks source link

Core Affinity Issue Zen 2 Thread Rippers #18

Closed supasnipa360 closed 3 years ago

supasnipa360 commented 3 years ago

The miner does not appear to be utilizing all Cores/Threads on a 3970x:

  1. When threads are set to '-t 64': The 1st 16 cores are utilized, the remaining 16 are NOT. The 2 threads per cpu core are utilized. However, a low hashrate suggests the software may be trying to schedule 4 threads per utilized core instead of mapping 2 threads to the Cores in the other CCD residencies.

  2. Reducing the thread count to '-t 32': The threads appear optimized: The 1st 16 cores and the 2nd thread per core is efficiently utilized. Temperature spike and ~1.5x (HIGHEST HASHRATE) is noted.

  3. Reduction further (-t 16) reduces core usage to 8 cores and 8 threads.

Main Insight: AMDs CCD core groups for these appear in a 1,3,5,7 indexed arrangement in certain benchmarking softwares (This insight is in case the miner is mapping to 0,1,2,3)

michal-zurkowski commented 3 years ago

Are you using Windows? Afaik Windows has some weird problems with scheduling. The way to "fix" it is to go to the Task Manager -> Open Affinity of the cpuminer process and just click OK (do not have to change anything) and it will start utilizing all the cores. Newer encountered that kind of problem on Linux tho.

supasnipa360 commented 3 years ago

Hmm, interesting. Yep, on Windows. Also, sounds like something that would be a fix in windows - And it did work! Thanks for that. Is this going to be a bug fix eventually?

michal-zurkowski commented 3 years ago

It will be fixed with the release of 1.2.0 This was caused by windows being windows :)

Chipcraft commented 3 years ago

The issue is back in 1.2.1, 1.2.0 was fine in this regard.