fireice-uk / xmr-stak-cpu

Monero CPU miner
GNU General Public License v3.0
1.11k stars 478 forks source link

i5-650 Low hashrate on full processing #243

Open brunoaduarte opened 7 years ago

brunoaduarte commented 7 years ago

I'm facing some weird behavior here. When i set only 2 threads

"cpu_threads_conf" : 
 [ 
      { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 },
      { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 1 },
 ],

i get 78.5H/s and my CPU usage is maximum 50% on Windows Task Manager.

If i set 4 threads

"cpu_threads_conf" : 
 [ 
      { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 },
      { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 1 },
      { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 2 },
      { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 3 },

 ],

cpu usage goes up to 100%, but hashrate drops to 50H/s Shouldn't hashrate also increase by 50% ? Any ideas ?

zib92130 commented 7 years ago

Main factor is L3 cache from the CPU. Optimally each thread need 2MB L3 cache. If a thread is tagged "low_power_mode=true", it will need 22=4MB L3 cache. Having more threads than CPU L3 cache / 2 usually produce worse result. Above rule is a start. I warmly advice you to check by yourself the best configuration FOR YOU, depending on the power / heat / noise / hashrate / idle or not machine parameters that are important for YOU*.

Also prefer real core (not hyperthreaded ones), as they are only part (30-35%) power of a 'real' core.

In a few words : test by yourself ! :-)