fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

AMD FX very bad hashrate on CryptonightV8 #2039

Open brunoalexbr opened 6 years ago

brunoalexbr commented 6 years ago

Please provide as much as possible information to reproduce the issue.

Basic information

Compile issues

Issue with the execution

AMD OpenCl issue

  run `clinfo` and add the output here

Stability issue

At Cryptonight v7 hashrate at 3500MHz 387H/s, with same config of thread Cryptonight V7 make 270H/s. With 8 threads i can make 333H/s but with more consumition. In AMD FX processor best config is 5 threads in folow squeme:

{ "low_power_mode" : true, "no_prefetch" : false, "affine_to_cpu" : 0 },
{ "low_power_mode" : true, "no_prefetch" : false, "affine_to_cpu" : 1 },
{ "low_power_mode" : false, "no_prefetch" : false, "affine_to_cpu" : 3 },
{ "low_power_mode" : false, "no_prefetch" : false, "affine_to_cpu" : 5 },
{ "low_power_mode" : false, "no_prefetch" : false, "affine_to_cpu" : 7 },

Some implematation impact bad on performance. Old configs dont have asm parameter and this implementation cause this issue.

Spudz76 commented 6 years ago

no, CN2v2 """caused""" the issue; it has more tough math in it

Hammer or whatever series were bad at integer sqrt/div math, but they were sweet at floating point (algo does not use)

and the ASM only runs on newer AMD asm:auto should be selecting normal good old C code version (aka asm:off aka what the old code always did) and however your compiler chooses to do its ASM from there... you may see better results with Clang vs GCC (you never said what OS though)

Likely the new normal hashrate for FX series, it's about on par with other devices "v7" to "v8" loss.

brunoalexbr commented 6 years ago

The loses in Fx is strong, almost 30% under the same setting. Video cards are not heavy losses. Only on the Radeons R9 285, the RX 500 series is ok.

brunoalexbr commented 6 years ago

if i use 8 threads, the hashrate is same under same config on v7, but consumition is higher. Before i use 5 threads with two in low power, and hashrate is higher than 8 therads.

Zenitur commented 5 years ago

You need to set all cores "low_power_mode" = "false"

brunoalexbr commented 5 years ago

i try this, but consumition is higher than best config in v7 and low hashrate. FX 8 with 3500MHz V7 5 threads make 385H/s with 118w, now V8 with 8 threads make 330H/s and 175w. Isso very bad h/w relation.

psychocrypt commented 5 years ago

you can not compare the power consumtion of cn-v7 and cn-v8. The algorithm has changed a lot.

Zenitur commented 5 years ago

With cn-v7, I'd used 7 threads of 8. It shows more hashes. With cn-v8 I'm using 8 threads of 8 (with asm algo) P.S. nvidia OpenCL stopped to work with 9800GT (but works on Fermi)