With Monero (XMR) crypto-currencies on a rally over the past few weeks, we wanted to look at how the AMD Ryzen 7 CPUs performed in Monero mining. Although using an AMD Ryzen 7 1700 may produce solid performance for the low purchase price, we do not recommend purchasing systems solely for mining as you will see in this article. We recently started using Monero mining in our data center lab for a burn-in application. We are certainly far from a large operation accounting for only around 0.06% of the worldwide Monero hash rate. At the same time, our penchant for collecting data made us test a variety of configurations. We even have a Docker image that rocketed to over 50,000 pulls on Docker Hub for mining Monero. We benchmarked several server CPU configurations and have data on the biggest drivers of performance. We also have resources to get started with Monero mining on your own systems.
The Quick Monero Background
At the turn of 2017, and for the past several years, Bitcoin has been the largest cryptocurrency by far. Monero is a cryptocurrency that put an emphasis on privacy and is considered significantly more anonymous than Bitcoin. As a result, Monero has moved from a $0.50 / 1 XMR currency a year ago to $20/ 1 XMR as of today. That movement, and the privacy focus, has made Monero a top 5 cryptocurrency and pushed it into the mainstream with even a recent WIRED article on the currency.
The advantage of this has been that Monero is now very easy to exchange and has tools that are more mature than several other cryptocurrencies. For STH readers there is a larger implication. Unlike Bitcoin mining which is dominated by ASICs, Monero is currently best mined on GPUs. CPU mining can be profitable as well. That means STH readers have the infrastructure able to mine Monero.
Monero Benchmarks – Why STH?
At STH we have a unique position as we have an independent test lab facility with the largest array of different processors running at a given time. We even allow folks to try out different configurations with our DemoEval service. During downtime that affords us the ability to run, in a controlled manner, benchmarking and power consumption measurements. While there are various sources of user-submitted benchmarks, they do not provide exactly the same test setups to make apples-to-apples comparisons of Monero mining performance.
STH readers often have servers with spare CPU cycles and potentially power budgets in data centers, so this is an application with a small footprint that can help offset some data center costs. For those running E3 and Xeon D CPUs, this is far from an ideal application. For example, a Xeon D-1587 with 16 cores / 32 threads performs about the same as a single Xeon E5-2630L V3 with 8 cores/ 16 threads. This is due to the L3 cache size reduction on Broadwell-DE and the importance of cache with Monero mining. We wanted to investigate AMD Ryzen architectures mining Monero.
We do not advocate buying AMD Ryzen systems for Monero mining. At the same time, it can be a good way to burn extra CPU cycles on servers that are already deployed into environments with excess power.
At the end of this article, we have some resources to get you started with mining Monero.
AMD Ryzen 7 Series Monero Mining Performance
We have a lengthy thread in the STH forums on Monero mining performance. That has a much larger set of benchmarks and instructions to get up and running on your servers within minutes. We wanted to provide a few charts with analysis. We are going to start with the raw hash rates of 18 test cases we are going to present today. In the linked thread we have several other configurations tested but we did want to focus on a few samples.
Here, the fact that the AMD Ryzen 7 systems have 16MB L3 cache helps support eight threads, four on each module. That L3 cache amount along with higher core counts and clock speeds allow the AMD Ryzen 7 systems to perform fairly well.
The next question is how well AMD Ryzen 7 systems perform with regards to the number of cores, threads, and L3 cache. Here is a summary of what that looks like.
You can see that the H/s per MB L3 cache numbers on the Ryzen 7 systems are bolstered by higher clock speeds.
We are going to keep all of these charts in the same order (by descending total hash rate from left to right) since we are presenting a lot of data. In the first deep-dive slide we are going to look at the L3 cache impact on mining performance.
These numbers we derived after many thousands of runs all using a consistent image. That allows us to do get an idea regarding how efficient each of the systems are in terms of clock speeds as well.
Here the AMD Ryzen 7 systems fall into line with what we would expect from Broadwell generation CPUs. Whereas the L3 cache view showed the imapct of higher clock speeds, this is a more normalized view.
We also wanted to provide a look at the H/s figures based on Turbo clocks. We are using the max single core turbo speeds here not the all core turbo speeds, however, there is usually a correlation in terms of the number of clock speed increments.
Again, AMD Ryzen 7 CPUs fall into line when normalized for clock speeds.
A Word On Power Consumption
Power consumption wise, the AMR Ryzen 7 platform is at a disadvantage due to higher clock speeds. When mining, a single socket AMD Ryzen 7 1700 system uses about 133w without remote management capabilities and two DDR4 DIMMs. Compare this to a dual socket Intel Xeon E5-2628L V4 system with eight DDR4 DIMMs will utilize around 160w mining. That is a 60% improvement in hash rate for a power consumption delta for a 20% power bump (and that includes remote management power consumption.)
Overall, we would not advise building AMD Ryzen 7 systems specifically for Monero mining as CPU mining is only around 3.6H/s per Watt which is not overly profitable unless electricity is extremely inexpensive. The trade-off is that getting 8 cores and 16MB L3 cache with Ryzen 7 CPUs is thousands of dollars less than with Intel Xeon.
Resources and How To Get Started
If you want to get started easily, we have very simple resources that we have been working on, including Docker CPU and GPU mining images. We did have to add special tags for the AMD Zen architectures because AMD Zen based CPU are not properly reporting L3 cache in Linux. As a result, we have been using :zen at the end of our images for AMD Ryzen / Zen specific optimizations.
Here are a few relevant threads in the STH forums:
- Monero Mining Performance
- Monero CPU Mining with Docker
- Monero GPU Mining with nvidia-docker and Docker
- Monero CPU Mining with Docker Swarm (more on this very soon)
We are using Docker as we found a negligible performance impact (0.1% or so) with the ability to utilize orchestration to push the images over a Docker Swarm.
As an example, if you want to start with a Docker node immediately, you can simply:
- Sign up at Minergate for an account (remember the e-mail you use, we are going to assume firstname.lastname@example.org)
- Run the following command (use your Minergate email and you can change -it to -d if you do not want to see output):
docker run -it -e email@example.com servethehome/monero_cpu_minergate:zen
That will download and compile the popular CPU miner, determine the best thread count and start mining directly to the Minergate pool. We are using Minergate as it had better performance than several other pools we tried. In the forums we have several images already using different mining pools. We also already have images for using nvidia-docker and mining on NVIDIA GPUs.
Overall, AMD Ryzen performance is in-line with what we would expect. We have a great community of folks involved in Monero mining at STH. You can stop by the STH Forums community where the threads linked above are a great place to start and this is a fun hobby that can earn some significant money to offset data center costs. We would not recommend buying AMD Ryzen 7 hardware solely for Monero mining, however, it is a fun way to learn key concepts for Docker and utilize excess capacity if you already have the hardware.