fireice-uk / xmr-stak-cpu

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

cpu_thread_num on Ryzen 1700? #377

Open uclnj opened 7 years ago

uclnj commented 7 years ago

Following the L3 cache/2 recommendation (or /4 with low_power_mode) I'm finding the hash rate with 8 cores pinned using: { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : {0,2,3,6,8,10,12,14} } around 560H/s. I had cpu_thread_num at 8 with 559H/s, and found 4 gives me 560H/s, 5 gives 560H/s and 2 gives 544H/s, not that huge a difference.

Does the cpu_thread_num not do anything for the Ryzen processors?

psychocrypt commented 7 years ago

No the config is always used there is no option ignored. If you are running linux could you please poat the output of 'hwloc-ls'

uclnj commented 7 years ago

Winblows 10. This is my current rate on thread_num of 2.

HASHRATE REPORT
| ID | 2.5s |  60s |  15m | ID | 2.5s |  60s |  15m |
|  0 | 66.2 | 62.6 | (na) |  1 | 67.9 | 64.5 | (na) |
|  2 | 66.7 | 62.8 | (na) |  3 | 67.7 | 64.2 | (na) |
|  4 | 63.2 | 61.2 | (na) |  5 | 61.0 | 59.9 | (na) |
|  6 | 61.7 | 60.6 | (na) |  7 | 63.1 | 61.6 | (na) |
-----------------------------------------------------
Totals:   517.5 497.2 (na) H/s
Highest:  556.4 H/s

At 8, network copy speeds drop to 6-7MB/sec, at thread_num of 2 I can copy near full speed while still hashing.

psychocrypt commented 7 years ago

What do you mean with copy? The miner is not coping everything.

uclnj commented 7 years ago

When I copy files (running this on my own workstation.) At thread_num 8, the processor gets bogged down that my copy speeds drop to 6-7MB/sec, at thread_num 2 I can copy files at normal speeds.

My question is, at 2 I get 560H/s and at 8 I get 560H/s. What's the difference?

Diostar1 commented 7 years ago

Hi sorry for offtop , but how you take this h/s, on my Ryzen 1700 (non oc) max 400 h/s on win 8.1 x64 (xmr-stak-cpu) and always err Memory Alloc Failed( my set { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : {0,2,3,6,8,10,12,14} }) Please adwise problem solving.

uclnj commented 7 years ago

When you run xmr on Windows, do it as admin. Either start the command prompt as admin and run or right click on the launcher and run as admin.

sheepchen commented 7 years ago

a little bit offtop: how does your config work? I tried to replicate your problem and ran into a strange problem. I have to give every CPU-core his own line in config:

you: { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : {0,2,3,6,8,10,12,14} }

me:

"cpu_threads_conf" : 
[ 
     { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 2 },
     { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 3 },
     { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 4 },
     { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 5 },
     { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 6 },
     { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 7 }
],

If i try this i get an config-parse-error.

"cpu_threads_conf" : 
[ 
     { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : {2,3,4,5,6,7} }
],

Furthermore i have an Intel-CPU and tried different setting with consider HT or not. It makes no difference. However I get way worse results if i use all of my cores than using all but not the first 2 (first core + HT).

If you get simmilar results with less cores than thas good. It only counts which H/s you get overall. This can be that with less load overall, single cores can work better(/hotter). But don't test 5 minutes and call it good. Let the test run for some hours so the system can get hot. If the results are the same than good.

And you said that your copy over network slows significantly. This can be because you stressed your CPU too much. Free up core 0 (0 and 1 are mostly used bei OS). Also check network and harddisk/controller drivers. Better drivers need fewer CPU-Cycles to run and can be smoother by extreme loads.

psychocrypt commented 7 years ago

each corr needs its own line in the config. He shorted his config for the issue.

vibhas77 commented 7 years ago

I am on Ryzen 1700X and noticed the same happening. I am getting around 500H/s if I use 7 threads and same if I use 9 threads.

ykutlu commented 6 years ago

r7 1700 (no 1700x) oc 3.75 HASHRATE REPORT - CPU | ID | 10s | 60s | 15m | ID | 10s | 60s | 15m | | 0 | 77.0 | (na) | (na) | 1 | 77.1 | (na) | (na) | | 2 | 77.1 | (na) | (na) | 3 | 77.1 | (na) | (na) | | 4 | 76.7 | (na) | (na) | 5 | 76.7 | (na) | (na) | | 6 | 76.6 | (na) | (na) | 7 | 76.7 | (na) | (na) |

Totals: 615.2 (na) (na) H/s Highest: 615.9 H/s

cpu.txt is down "cpu_threads_conf" : [ { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 2 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 4 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 6 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 8 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 10 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 12 }, { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 14 }, ],