Post
Topic
Board Mining (Altcoins)
Re: [ANN]: cpuminer-opt v3.9.2.3, open source optimized multi-algo CPU miner
by
malafaya
on 08/06/2019, 19:12:11 UTC

There's another downside to specifying a custom cpu affinity. Whe using  the default
each thread is affined to a precise cpu, the one matching the thread number.
With a custom affinity mask it's more complicated so the thread is afffined to the "mask"
which means any of the allowable cpus.

I don't feel like doing the additional coding to do one to one matching of each thread
to a unique allowable cpu.

Affinity should only be needed if there is a good reason to run fewer threads and if the CPU
is an AMD. That's small set.


The almost-alternating masks on Windows was found by trial and error to yield the best performance with all the Intel CPUs I've experimented with (correction: for a few older ones, it doesn't make any difference in which case I don't set affinity). I just know that Linux uses a different numbering convention and that rules are different, but an alternating mask always seemed best on Windows. Or perhaps the numbering convention in cpuminer is not the same as in Windows Power Shell. I will try to incorporate the info you posted along with the new release and see if it makes any difference. One thing seems for sure: many times, using all CPUs is worse than using just a subset (memory/L cache ceiling somewhere? Maybe with more CPUs it's even worse), and using a specific affinity seems to always work better than using default one with a subset of CPUs.

Thanks and let's move on. Smiley