I previously asked if someone would be kind enough to do a test on a Ryzen 3xxx
to compare AVX2 vs AVX performance. With Ryzen 1xxx AVX2 was often slower than AVX.
The results will help me decide how to deliver Windows binaries for Ryzen and whether
AVX2 should override SHA.
Currently only Ryzen has SHA so it's simple, use it if it's there because AVX2 is slow.
It gets more complicated when Intel releases Icelake with SHA for the desktop. AVX2 is
faster than SHA on Intel CPUs.
Which is faster on Ryzen 3xxx and does the new znver2 compile arch make a difference?
Requirements:
Any Ryzen or TR CPU from the 3xxx series.
A recent Linux distro.
Goal:
Compare AVX2 vs AVX performance on Ryzen 3000 series CPUs using blake2s algo.
Compare AVX2 vs SHA performance on Ryzen 3000 series CPUs usimg sha256t algo.
Determine if the new znver2 compile arch has an effect on the results.
Determine if Intel and Ryzen need to prioritize features differently..
Procedure:
1. Compile seperate builds for znver1, znver2, and avx2 and avx
./autogen.sh
CFLAGS="-O3 -march=znver1 -Wall" ./configure --with-curl
make -j 4
mv cpuminer cpuminer-znver1
make clean
CFLAGS="-O3 -march=znver2 -Wall" ./configure --with-curl
make -j 4
mv cpuminer cpuminer-znver2
make clean
CFLAGS="-O3 -march=core-avx2 -maes -Wall" ./configure --with-curl
make -j 4
mv cpuminer cpuminer-avx2
[make clean
CFLAGS="-O3 -march=core-avx -maes -Wall" ./configure --with-curl
make -j 4
mv cpuminer cpuminer-avx
2. Do a blake2s benchmark on each build. 5 minutes each should be enough
to produce a stable hash rate.
./cpuminer-znver1 -a blake2s --benchmark --hash-meter
./cpuminer-znver2 -a blake2s --benchmark --hash-meter
./cpuminer-avx2 -a blake2s --benchmark --hash-meter
./cpuminer-avx -a blake2s --benchmark --hash-meter
3. Repeat the tests with sha256t.
4. Post your results including CPU model, GCC version and the stable total hash rate
for each test.
Thanks in advance, the results will help ensure optimum performance on Ryzen CPUs.