r/VerusCoin • • Jan 31 '21

Mining speed Linux tests -- AMD 5950X CPU

#+TITLE: AMD 5950X Hashes

#+AUTHOR: Paraplegic Racehorse

#+DATE: 2021-01-31

#+DESCRIPTION: Testing various kernels and distributions hash rates randomx and verushash2.2 on AMD Ryzen 5950X CPU -- stock clocks

#+SUMMARY: Alpine Edge and Intel's Clear Linux are interesting for maximizing mining hash rate on AMD 5000-series CPUs. For other distros, while moving to the 5.10.x kernel does provide some uplift in the form of increased hash rate, GPU-oriented miners may want to wait until their GPU-vendor provides drivers for this kernel version. NVIDEA already has support for 5.10.x.

* Test Hardware

- All tests on ASUS x570 motherboard with latest BIOS installed.

- All CPU clocks and timings are STOCK (as shipped to me from Velocity Micro)

- All RAM clocks and timings are as shipped (3400MHz RAM, BIOS-clocked at 3200MHz)

- boot/run device is PCIE4 NVME to eliminate disk I/O factor

* Test Software and settings

** RandomX/Monero

- Xmrig 5.8.0 compiled, not binary distribution

- example ~config.json~ from binary distribution customized with pool settings and SMR, 1GB Pages, QoS all set =true=.

- SMR kernel module installed

- scripts from xmrig source distribution used to enable SMR, 1GB Pages in system

- Xmrig run as privileged user, not root. Running as root attempted on several distributions but it made no difference, despite what docs at xmrig website claim.

** Verushash 2.2

- Monkins1010 ccminer 3.7.1 compiled from source

- difficulty hint set to 40000

- all 32 threads set to mine

- verus always tested after xmrig. May or may not have residual benefit from SMR and Pages enablement

- No set mining time was used to establish speed rating. I waited (most, except for OpenSUSE) until the hash speed stabilized, however long that took.

** Pool

- zergpool supports both rx/0 and verushash.

- same stratum location (North America) in miner configs

** Linux Kernels

- All kernels came from stock binary repositories

- Manjaro AMD kernel not tested because it is not yet zenver3.

- None of the kernels were compiled with =zenver3= gcc flag.

- OpenSUSE supposedly has a kernel available compiled with =zenver3= flag. I was not able to find and install it, however.

- Ubuntu alternate kernels Liquorix and XanMod not tested.

- 5.10 kernel only partly stock. Binary packages downloaded from Ubuntu kernel archives. It is not yet available in repositories.

** Other Distributions

I did not test other mining-oriented distributions. All are kernel 5.4 or 5.0 and are GPU-optimized with little or no regard for CPU miners. PiMP only tested because I already had a copy available to me on disk in another machine.

* Results

#+CAPTION: RandomX in kH/s; Verushash in MH/s

| Distribution        | Kernel | Randomx | Verushash | Notes                |
|---------------------+--------+---------+-----------+----------------------|
| Ubuntu 20.04        |    5.8 |    13.2 |      45.9 | rx/0: -MSR, +Pages   |
| Ubuntu 20.04        |   5.10 |    14.7 |      45.9 | rx/0: +MSR, +Pages   |
|                     |        |         |           |                      |
| Manjaro 20.2.1      |    5.9 |    14.6 |      45.9 | rx/0: -MSR, +Pages   |
| Manjaro 20.2.1      |   5.10 |    14.6 |      45.9 | rx/0: -MSR, +Pages   |
|                     |        |         |           |                      |
| Fedora 33           |   5.10 |    12.8 |      45.1 | rx/0: -MSR, -Pages   |
|                     |        |         |           |                      |
| OpenSUSE Tumbleweed |   5.10 |    14.9 |     44.8+ | rx/0: -MSR, +Pages;  |
|                     |        |         |           | + still accelerating |
|                     |        |         |           |                      |
| Debian 10           |   4.19 |    9.45 |      xxxx | see below            |
|                     |        |         |           |                      |
| Clear Linux         |   5.10 |    14.6 |      47.1 | rx/0: -MSR, -Pages   |
|                     |        |         |           |                      |
| Alpine Edge         |   5.10 |    14.7 |      xxxx | see below            |
|                     |        |         |           |                      |
| PiMP 2.24           |    5.4 |    14.2 |      45.3 | rx/0: +MSR, +Pages;  |
|                     |        |         |           | boot from SATA SSD,  |
|                     |        |         |           | not NVME.            |
|---------------------+--------+---------+-----------+----------------------|

** Additional Notes:

- Graphical desktop was not achieved on PiMP, Clear, OpenSUSE, or Alpine

- No attempt made to install graphical desktop on Alpine.

- =zenver3= gcc flag not intentionally, by me, passed to software compiles. Compile scripts may or may not have enabled =-march=native=, however, and benefited from the zen3 optimizations on those distros with gcc version 10. I did not verify this in the build scripts.

- No attempt was made to monitor temps or power use. Air coming from CPU cooler was always cold, subjectively speaking, based on waving my hand through the exhaust air.

- Debian: Gah! What a mess! Even the latest stable is using a super-old kernel. Fxxxing Debian! After testing Xmrig, I gave up. rx/0: -MSR, -Pages

- Alpine Edge: Unable to compile ccminer due to syntax error in configure file which I was unable to find a solution for. Not sure why Alpine picked this up but none of the others did. Weird.

- rx/0: +MSR, -Pages

- OpenSUSE Tumbleweed takes a year and a day to complete a basic installation. It was the only distro which allowed switching off SMT mitigations during install, however. This is very interesting. It was tested with mitigations OFF.

- PiMP version Xmrig installed as binary using standard PiMP method (pimp --add) and configured in standard PiMP method. ccminer(verus) not available in PiMP software collection. This was previously compiled on other hardware prior installing drive in this system.

* Observations

AMD inserted the Gen3 Ryzen drivers into the Linux kernel at version 5.10. It has been reported this should result in an additional 10% performance (task dependent.) While there is clearly a boost in using the 5.10 kernel, it is far from a +10% uplift for these tasks. However, none of the tested kernels were also compiled with the =zenver3= gcc compiler flags so it is possible further improvement can be had. AMD has put additional zenver3 code into the 5.11 Linux kernel. However, 5.11 is not an LTS kernel and 5.10 is. That code may be back-ported into the 5.10 when 5.11 is eventually released and 5.10 is actually tagged LTS. How many, and which, if any, distros outside the Arch ecosystem will ship 5.10 zenver3-compiled kernels? Probably none, to be frank. And it may take Debian 20 years to ship even with 5.4 LTS.

Remember, these tests were carried out with stock clocks and timings. We've all seen higher numbers posted, both on Windows and Linux. I just wanted to compare and contrast the differences between distributions and kernel versions. Furthermore, it's possible that overclock settings will alter the performance differences. Perhaps Fedora really shines at +1800Hz/-0.2mV; perhaps not.

The outliers are Debian and Clear Linux. Debian is running an ancient kernel and compiler stack so it is not surprising to see it lag far behind. Clear Linux is interesting in that it is an Intel product and, thus, highly optimized to Intel's processor line. Still, whatever they are doing, AMD chips are also reaping the benefits. Clear Linux behavior when hashing Verus is also interesting in that the ccminer program ramps the speed up over time, but on Clear Linux, not only did the speed stabilize higher, it also accelerated faster than other distributions (OpenSUSE was glacially slow in its acceleration.)

I can't explain why Fedora is marginally slow. In the past, Fedora (actually: CentOS) has been one of the go-to Linux CPU speed demons.

Alpine shows a lot of promise in its RandomX numbers and I'm disappointed not to have successfully compiled and tested ccminer(verus) on it. This may be a benefit of being compiled with musl libc instead of glibc. However, we can see other cases (Clear Linux) where one algorithm keeps pace with other distros and the other leads. I'm still disappointed and will probably continue testing Alpine albeit on a USB stick, the way Alpine is intended to be used. :)

[

Edit:

Egads! Reddit apparently hates emacs org-mode, and markdown has horrendous table support. Formatting improved, but far from fixed.

]

15 Upvotes

0 comments sorted by