How to get best Monero mining efficiency
Here is a list of requirements for good mining performance from the RandomX repo on GitHub:
- 64-bit architecture
- IEEE 754 compliant floating point unit
- Hardware AES support (AES-NI extension for x86, Cryptography extensions for ARMv8)
- 16 KiB of L1 cache, 256 KiB of L2 cache and 2 MiB of L3 cache per mining thread
- Support for large memory pages
- At least 2.5 GiB of free RAM per NUMA node
- Multiple memory channels may be required:
- DDR3 memory is limited to about 1500-2000 H/s per channel (depending on frequency and timings)
- DDR4 memory is limited to about 4000-6000 H/s per channel (depending on frequency and timings)
Let's look at the most important ones. I will ignore some things because pretty much any modern CPU will already have it.
Cache
Having adequate cache is pretty important. Most CPUs have multithreading these days, which means there are two threads for each core. If the CPU does not have enough cache, it will only mine on as many threads as there is enough cache for. For example, let's say you buy a CPU with 10 cores (20 threads) and 20MB of cache. This is only enough for 10 threads. A large amount of the CPU's performance will be unused because it doesn't have enough cache. In this case, task manager would show 50% CPU usage.
If you already have a CPU you want to use for mining and it doesn't have enough cache, don't worry about it. Just expect to see less than 100% of your CPU being used while mining, and know that the reason is cache.
Multiple memory channels
What does this mean? Well, generally a computer will support a certain number of memory channels. Consumer motherboards and CPUs usually support 2. Server motherboards and CPUs usually support 8. More memory channels are better because it means more memory bandwidth (in simplest terms, it's faster).
So how is this relevant to you? If we assume you have a normal consumer motherboard with 2 channels, you can get the optimum performance by ensuring both channels are being used. That means you should have two RAM sticks, not just one. And you should look in the motherboard manual to see which slots they should be inserted into, to use both channels.
Hardware AES support
I thought I would mention this one even though most CPUs do have it, because there is one very popular computer that doesn't - the Raspberry Pi. Many people have tried to mine Monero on a Raspberry Pi, and while it is possible, it's extremely slow, partially because it's missing hardware AES support.
Support for large memory pages
On Windows, XMRig will automatically try to enable this. You should run XMRig as an administrator so that it can. This speeds up mining by quite a lot, and is so simple to do.
Other things not on that list
RAM speed
Certain CPUs are more reliant on high RAM speed for good performance. In particular, Ryzen CPUs. The optimum RAM speed for cost/performance seems to be 3600 MHz. If you're buying RAM, try to buy the highest speed you can get for a reasonable price.
If you have a computer already, make sure you have the XMP profile set. This is done from the BIOS. There are plenty of guides on this.
You might also want to look into overclocking your RAM. It's not guaranteed, but it's often possible to get it to run at a higher speed or faster timings by increasing the voltage slightly. This will further improve mining performance.
MSR mod
Without going into too much detail, MSR mod sets some registers that make your CPU mine more effectively. You have to start XMRig as an administrator for this to work. You also may have to restart the computer the first time you do this. Read the console messages in XMRig and see if it tells you to.
CPU Overclock/underclock
This one is very important for power efficiency.
Generally you can overclock a CPU to get a little bit more performance out of it. This will equate to a higher hashrate (measured in hashes per second H/s). However, this normally uses a lot of power to gain a tiny bit of performance. If you have free electricity, or want to generate heat, then you might want to consider overclocking.
If you pay for electricity and want to get the most Monero for the least power usage, then you will want to underclock your CPU. Most CPUs run at a higher frequency than what they're most power efficient at. By underclocking the CPU, you force it to operate in a range where it is most power efficient. In my own computer, I have it manually underclocked (and undervolted, see the section on this) and I get about 90% of the usual performance with far lower power usage.
CPU undervolting
A CPU will run at a set voltage for a given frequency. This voltage is often slightly higher than it needs to be. By manually "undervolting" your CPU, you can reduce the amount of power it uses and the heat it generates. You usually do this by setting a frequency for the CPU to operate at, and setting the voltage. I recommend to figure out what the normal voltage is for a given frequency by using monitoring software such as Ryzen Master for AMD Ryzen CPUs . Do this while mining by setting a power limit. Then set a manual underclock for that frequency and put in the voltage you found. Decrease this voltage step by step while mining, and hope it doesn't crash or report that your share was rejected. If either of these things happen, set the voltage up by one notch.
Unnecessary power use
You can further reduce your power usage by disconnecting components or peripherals that aren't needed. Some motherboards will work without a graphics card, even when the CPU doesn't have built in graphics (such as all of the high performance Ryzen CPUs). This is more advanced though so let's look at some other options.
How many case fans do you have running. Do you need all of them? I unplugged all of mine, and because I have underclocked and undervolted my CPU, it still stays cool.
Do you have a hard drive and an SSD? Or multiple SSDs or hard drives? Unplug the rest and only leave the boot drive.
Do you need to leave the mouse and keyboard connected? They could be wasting a few watts.
Are there any other peripherals connected that don't need to be? Like a USB Bluetooth adapter that you never use? You could remove these too.
Comments
Post a Comment
All comments are held for manual approval to stop spam. Don't even try it!