XMRig: Download, Config, Optimization and Nicehash - full guide
AMD Eng Sample: - 101803.97
AMD EPYC 7742 64-Core - 98527.99
AMD EPYC 7H12 64-Core - 95400.73
AMD EPYC 7702 64-Core - 93554.12
AMD EPYC 7K62 48-Core - 85965.30
Review
XMRig is a coin mining software based on RandomX, KawPow and CryptoNight algorithms. Suitable for both AMD and Nvidia video cards and processors. Official binaries are available for Windows, Linux, macOS, and FreeBSD.
The program has a commission to the developer in the form of 1-5%. In this step-by-step instruction, we will tell you how to set up the commission and body shirts for different coins.
Recommended drivers:
Open source.
High performance.
Official Windows support.
Randomx support.
Nicehash support.
Algorithms
Algorithm | Memory | Ver. | Description | Note |
---|---|---|---|---|
cn / upx2 | 128 KB | 6.12.0+ | CryptoNight-Femto (variant of CryptoNight V2 for Uplexa). | |
argon2 / chukwav2 | 1 MB | 6.4.0+ | Argon2id (Chukwa v2). | CPU only |
cn / ccx | 2 MB | 6.2.0+ | Conceal (CCX) | |
kawpow | - | 6.0.0+ | KawPow (Ravencoin) | GPU only, not supported by xmrig-proxy |
rx / keva | 1 MB | 5.9.0+ | RandomKEVA (RandomX variant for Keva). | |
astrobwt | 20 MB | 5.8.0+ | AstroBWT (Dero). | |
cn-pico / tlo | 256 KB | 5.5.0+ | CryptoNight-Pico (Talleo). | |
rx / sfx | 2 MB | 5.4.0+ | RandomSFX (RandomX variant for Safex). | |
rx / arq | 256 KB | 4.3.0+ | RandomARQ (RandomX variant for ArQmA). | |
rx / 0 | 2 MB | 3.2.0+ | RandomX (Monero). | |
argon2 / chukwa | 512 KB | 3.1.0+ | Argon2id (Chukwa). | CPU only |
argon2 / ninja | 256 KB | 3.1.0+ | Argon2id (NINJA) | CPU only |
rx / wow | 1 MB | 3.0.0+ | RandomWOW (RandomX variant for Wownero). | |
cn / fast | 2 MB | 3.0.0+ | CryptoNight variant 1 with half iterations. | |
cn / rwz | 2 MB | 2.14.0+ | CryptoNight variant 2 with 3/4 iterations and reversed shuffle operation. | |
cn / zls | 2 MB | 2.14.0+ | CryptoNight variant 2 with 3/4 iterations. | |
cn / double | 2 MB | 2.14.0+ | CryptoNight variant 2 with double iterations. | |
cn / r | 2 MB | 2.13.0+ | CryptoNightR (Monero's variant 4). | |
cn-pico | 256 KB | 2.10.0+ | CryptoNight-Pico. | |
cn / half | 2 MB | 2.9.0+ | CryptoNight variant 2 with half iterations. | |
cn / 2 | 2 MB | 2.8.0+ | CryptoNight variant 2. | |
cn / xao | 2 MB | 2.6.4+ | CryptoNight variant 0 (modified). | |
cn / rto | 2 MB | 2.6.4+ | CryptoNight variant 1 (modified). | |
cn-heavy / tube | 4 MB | 2.6.4+ | CryptoNight-Heavy (modified). | |
cn-heavy / xhv | 4 MB | 2.6.3+ | CryptoNight-Heavy (modified). | |
cn-heavy / 0 | 4 MB | 2.6.0+ | CryptoNight-Heavy. | |
cn / 1 | 2 MB | 2.5.0+ | CryptoNight variant 1. | |
cn-lite / 1 | 1 MB | 2.5.0+ | CryptoNight-Lite variant 1. | |
cn-lite / 0 | 1 MB | 0.8.0+ | CryptoNight-Lite variant 0. | |
cn / 0 | 2 MB | 0.5.0+ | CryptoNight (original). |
Traditionally, at the end of the article there will be examples of ready-made.bat files. As well as an archive with a fully configured program.
If this instruction is useful to you, you can thank us by launching mining on a niche wallet for a while.
Setup Guide
In order to mine coins you need:
- Download program.
- Unzip to any convenient place.
- Edit the.bat file with the desired coin.
- Insert your wallet address.
- Run the program by double clicking on the file with the extension
.bat
.
The content of the compiled miner looks like this:
Arguments for mining can be written both in a file config.json
and in files with the .bat
. The process of mining cryptocurrencies is launched by double-clicking on a batch file. For example, monero-supportxmr-CPU.bat
will mine Monero on a processor.
Let's consider the setting in more detail.
Setup guide
To mine coins on the randomx algorithm, we need to create or edit a ready-made batch file for the coin you need. These are basic settings, which are sufficient for mining. We'll look at the secondary settings later.
Bat file for Monero
xmrig
this key will indicate which program will be launched. We leave it as it is.-o pool.minexmr.com
we indicate the address of your pool for mining. In this example, we have minexmr.com, because at the time of writing, it has received the most positive reviews.443
after the pool address, specify the pool port with a colon.-u 84XFxjQVYoJjQBeyfbcYBgJ1tw4cgywGyTp12nQw3mSKZctgMYuPGRH1y2LuBAS8yyT8ZX2NDS3CXbfFAxdXQJwAGMoMDSq
after the -u key, we indicate the address of your digital wallet. Get it on the cryptocurrency exchange, or install a cold wallet.
You can add the "pause" key at the very bottom of the batch file, so that in the event of a program error or incorrect syntax of the.bat file, the program does not immediately close, but displays the error code and description on the screen.
A ready-made setup example:
xmrig -o pool.minexmr.com:443 -u 84XFxjQVYoJjQBeyfbcYBgJ1tw4cgywGyTp12nQw3mSKZctgMYuPGRH1y2LuBAS8yyT8ZX2NDS3CXbfFAxdXQJwAGMoMDSq -k --tls
pause
Attention! In order for the program to run, you must strictly adhere to the syntax of the.bat file. Observe all dots, colons, and cons. Don't put extra spaces and characters where they shouldn't be.
The program is launched by double-clicking on the batch file you have made or edited.
Config for Nicehash
xmrig
this key will indicate which program will be launched.-a randomx
specify the algorithm. For Monero, leave this one. For coins on the cryptonight or kawpow algorithm, we indicate them.-o randomxmonero.eu.nicehash.com
we indicate the address of your pool. In this example, we have a pool for the Nicehash program.3380
after the pool address, specify the pool port with a colon.-u 1Pz3EcHsRuJkraNRACUrBrLaxiTPP1VHJZ
after the -u key, we indicate the address of your digital wallet from your Nicehash account. Get it on the cryptocurrency exchange, or install a cold wallet.rig1
we indicate the name of the farm. You can specify any.--coin monero
indicate which coin will be mined.
A ready-made setup example:
xmrig -a randomx -o randomxmonero.eu.nicehash.com:3380 -u 1Pz3EcHsRuJkraNRACUrBrLaxiTPP1VHJZ.rig1 --coin monero
pause
Nanopool
xmrig
this key will indicate which program will be launched.-o xmr-eu1.nanopool.org
specify the Nanopool address.14433
after the pool address, specify the pool port with a colon.-u 84XFxjQVYoJjQBeyfbcYBgJ1tw4cgywGyTp12nQw3mSKZctgMYuPGRH1y2LuBAS8yyT8ZX2NDS3CXbfFAxdXQJwAGMoMDSq
after the -u key, we indicate the address of your digital wallet.--coin monero
indicate which coin will be mined.
A ready-made setup example:
xmrig -o xmr-eu1.nanopool.org:14433 -u 84XFxjQVYoJjQBeyfbcYBgJ1tw4cgywGyTp12nQw3mSKZctgMYuPGRH1y2LuBAS8yyT8ZX2NDS3CXbfFAxdXQJwAGMoMDSq --tls --coin monero
pause
This completes the basic setup of the miner and runs the program.
But for the sake of completeness of the instructions, we will consider all the program keys in the "Advanced configuration" section.
Enabling huge pages
Let the miner access memory. This setting increases the hash rate.
Open gpedit.msc
If you have Windows 10 Education / enterprise or Professional:
Click "Run" in the start menu -> type: gpedit.msc
and press Enter.
For those with Windows 10 Home
If you have Windows 10 Home (or Single Language Edition - a version for one language), then you have gpedit, but it is disabled by default and you need to enable it. You can use the.bat file from askvg.com, which will do all of this for you.
Go to askvg.com
Scroll down to Method 1: For Windows 10 Users Only and follow the instructions to download and run the.bat file.
Restart your computer as instructed.
Click "Run" in the start menu -> type: "gpedit.msc" and hit enter.
In open gpedit:
- Expand Computer Configuration and navigate to Windows Configuration.
- Expand Security Settings.
- Expand Local Policies.
- Select User Rights Assignment.
- In the right side corner, scroll down and select: Lock pages in memory.
- Select Add User or Group.
- Enter the username you use when logging into Windows and select Check Names.
- If you have a Microsoft account with an email address, then include the @ domain.com part in the name.
- The system will underline your name.
- Click OK and then close the main security policy screen. You need to restart your computer before starting the miner, but don't do it now - it will naturally restart later.
The figure below shows the screens you just saw. Click on the photo to expand and view it in large size.
If you see "1GB PAGES unavailable" - you can't run 1GB pages in Windows. This is a Linux feature.
Configuring for AMD
Add us to your bookmarks to always be aware of what is happening in the world of mining.
Similar to NVIDIA, you can also customize AMD graphics cards. The same syntax that you can use in the XMR STAK program can also be used in the XMRig.
Here we can adjust the intensity. Example config.json for Vega64:
"threads": [ { "index": 0, "intensity": 1984, "worksize": 16, "strided_index": 2, "mem_chunk": 2, "unroll": 8, "comp_mode": true, "affine_to_cpu": false },
And the production is also started through the batch file.
An example of a batch file for AMD:
:start xmrig -a randomx -o xmr-eu1.nanopool.org:14444 -u 44tLjmXrQNrWJ5NBsEj2R77ZBEgDa3fEe9GLpSf2FRmhexPvfYDUAB7EXX1Hdb3aMQ9FLqdJ56yaAhiXoRsceGJCRS3Jxkn.5d3c802ee0f8e12e4eb9792722b7816a42178aa29ef7477c138ddb940c55648d.rig1 -p x --donate-level=1 --opencl goto start
Configuring for Nvidia
For NVIDIA and AMD versions of XMRig, the settings in the batch file are not enough. There are also settings that we would like to specify. These are the streams settings.
If you are using a GPU using XMRig then editing this setting is essential and you can expect optimal performance when tuning. Below is the code applicable to NVIDIA GPUs. It is written to the config.json file:
After starting the program, you will see the following information displayed: what does it mean?
GeForce GTX 1070 8GB @ 2300/2920 MHz 16x39 8x25 arch: 52 SMX: 13
This means: 16 threads, x 39 blocks, bfactor 8 x and bsleep 25.
52 architecture and SMX 13 multiprocessor.
These are nothing more than GPU settings, and in order to get optimal performance on your graphics card, you need to play around with these settings.
For example, your PC may freeze while mining, and in this case, you can try to reduce the value of the number of threads and bfactor.
Simple configuration for Nvidia:
If you are using the program on a multi-GPU farm, you can add these parameters for each GPU by adding a comma. Here, the index is the number of GPUs that your system identifies.
Example:
"threads": [
{
"index": 0,
"threads": 12,
"blocks": 39,
"bfactor": 8,
"bsleep": 100,
"affine_to_cpu": false
},
{
"index": 1,
"threads": 12,
"blocks": 39,
"bfactor": 8,
"bsleep": 100,
"affine_to_cpu": false
},
{
"index": 2,
"threads": 12,
"blocks": 39,
"bfactor": 8,
"bsleep": 100,
"affine_to_cpu": false
},
{
"index": 3,
"threads": 12,
"blocks": 39,
"bfactor": 8,
"bsleep": 100,
"affine_to_cpu": false
},
],
Production through a batch file is started.
An example of a batch file for Nvidia:
:start xmrig -a randomx -o pool.supportxmr.com:5555 -u 44tLjmXrQNrWJ5NBsEj2R77ZBEgDa3fEe9GLpSf2FRmhexPvfYDUAB7EXX1Hdb3aMQ9FLqdJ56yaAhiXoRsceGJCRS3Jxkn.5d3c802ee0f8e12e4eb9792722b7816a42178aa29ef7477c138ddb940c55648d.rig1 -p x --donate-level=1 --cuda goto start
Complete list of all commands
Now let's take a look at all the settings. Most of these settings are needed to fine-tune performance for your hardware configuration.
Settings for sharing to a pool
-o, --url=URL
specify the URL of the mining server.
-a, --algo=ALGO
choose a mining algorithm (see the supported algorithms in the article above).
--coin=COIN
specify a coin instead of an algorithm.
-u, --user=имя
the username for the mining server.
-p, --pass=PASSWORD
password for the mining server.
-O, --userpass=U:P
pair password: user for the mining server.
-k, --keepalive
send keepalived packets to prevent timeout (pool support required).
--nicehash
enable nicehash support.
--rig-id=ID
specify the farm ID to track statistics on the pool side (requires pool support).
--tls
enable SSL / TLS support (pool support required).
--tls-fingerprint=HEX
specify the pool TLS HEX for a strict certificate.
--daemon
use RPC daemon instead of solo mining pool.
--daemon-poll-interval=N
RPC daemon request interval in milliseconds (default: 1000).
--self-select=URL
independently choose block templates from the URL.
-r, --retries=N
specify the number of attempts before switching to the backup pool server (default: 5).
-R, --retry-pause=N
pause time between connection attempts (default: 5).
--user-agent
set a custom user-agent string for the pool.
--donate-level=N
set the commission level, by default 5 %% (5 minutes every 100 minutes).
--donate-over-proxy=N
stop commission control over the xmrig-proxy function.
Processor settings
--no-cpu
disable cpu
-t, --threads=N
specify the number of CPU threads
-v, --av=N
select the algorithm option, 0 - automatic selection
--cpu-affinity
set the binding of the miner process to the processor core (s), using the 0x3 mask for cores 0 and 1.
--cpu-priority
set the process priority (0 idle, 2 normal, 5 the highest).
--cpu-max-threads-hint=N
specify the maximum number of processor threads (in percent). This will be the hint for autoconfiguration.
--cpu-memory-pool=N
specify the number of "Locking pages in memory" of 2 MB for the persistent storage pool, -1 (auto), 0 (disable).
--no-huge-pages
disable the Lock Pages in Memory option.
--asm=ASM
ASM optimization, possible values: auto, none, intel, ryzen, bulldozer.
--randomx-init=N
specify the number of threads to initialize the RandomX dataset.
--randomx-no-numa
disable NUMA support for RandomX.
API settings:
--api-worker-id=ID
specify a custom worker ID for the API.
--api-id=ID
provide a custom instance ID for the API.
--http-host=HOST
bind host for HTTP API (default: 127.0.0.1).
--http-port=N
bind port for HTTP API.
--http-access-token=T
specify an access token for the HTTP API.
--http-no-restricted
enable full remote access to the HTTP API (only if an access token is set).
OpenCL Settings (AMD):
--opencl
enable mining on OpenCL (AMD).
--opencl-devices=N
specify a comma-separated list of cards to mine.
--opencl-platform=N
specify the index or name of the OpenCL platform.
--opencl-loader=PATH
specify the path to OpenCL-ICD-Loader (OpenCL.dll or libOpenCL.so).
--opencl-no-cache
disable OpenCL cache.
--print-platforms
display available OpenCL cards and exit.
CUDA settings (Nvidia):
--cuda
enable mining on CUDA (Nvidia).
--cuda-loader=PATH
specify the path to the CUDA plugin (xmrig-cuda.dll or libxmrig-cuda.so).
--cuda-devices=N
specify a comma-separated list of Nvidia cards to mine.
--cuda-bfactor-hint=N
specify bfactor (hint for autoconfiguration (0-12)).
--cuda-bsleep-hint=N
specify bsleep (hint for autoconfiguration).
--no-nvml
disable NVML (NVIDIA Management Library) support.
Event and error log:
-l, --log-file=FILE
write all output to a file.
--print-time=N
display hashrate report every N seconds.
--health-print-time=N
display a status report every N seconds.
--no-color
disable color output in the console.
Miscellaneous:
-c, --config=FILE
load configuration file in JSON format.
-B, --background
run the miner in the background.
-V, --version
display version information and exit.
-h, --help
show help and exit.
--dry-run
run test configuration and exit.
--export-topology
export hwloc topology to XML file and exit.
Пример для монеты ArQmA на алгоритме RandomARQ:
:start xmrig -a RandomARQ -o arqma.herominers.com:10641 -u ar3DrXowWeFdrCbwnfSWgchP9SSaMYnsyaU4M2kSwoTFJzZ5zSre6eZQSHxSQWC2y172CvZNUgmtZBzoxNWKHsBR33TWvAZnL.ad8a262ab0f41d60.rig1 -p x --donate-level=1 goto start
Troubleshooting
How to reduce the commission?
By default, XMRig donates 5% of your power to developers. If you are generous, then leave it as it is. If you want to set the preferred donation amount yourself, edit it donate-level
. Minimum 1%. Example:--donate-level=1
THREAD # 0 COMPUTE ERROR
Occurs after connecting to the pool and before receiving shares. The error occurs in some versions of the program when it cannot handle the new AMD drivers. All you need to do to fix this problem is to download the 17.x blockchain drivers and install them instead of the current drivers. It also helps to reduce overclocking.
cryptonight_extra_cpu_final
This bug is solved by reducing the number of threads and blocks. Example:
"threads": [ { "index": 0, "threads":32
, "blocks":15,
"bfactor": 6, "bsleep": 25, "sync_mode": 3, "affine_to_cpu": false },
No CUDA device found!
This error occurs on Nvidia series graphics cards. The program cannot initialize the device.
Solution:
- check and reinstall drivers,
- use the version cuda-9_2 or cuda-8.0 (selected depending on the generation of the video card)
Rejected: “low difficulty share”
This means that you have selected the wrong pool port. You are receiving tasks from the pool with the wrong difficulty. Be sure to connect to the correct port depending on your equipment. Usually, several port categories are indicated on pools: For a farm of high-performance cards, for farms of medium-performance cards and for a single video card, or for a home PC.
Rejected: “Wrong algo, use monero7 miner”
Rejected: "Invalid algorithm, use monero7". This means that you entered the wrong algorithm or were unable to change the variant of the algorithm. You can also run into this error when you overclock your graphics cards too much, so keep that in mind.
msvcp140.dll
Missing any.dll libraries. These errors can occur on Windows. For example, the problem with the missing DLL file (msvcp140.dll) ". You can fix such errors by installing Microsoft Visual C ++ 2015 / x64.
Did you know you can use XMRig and XMR STAK at the same time? But when starting both miners, either of them will show the "HTTP daemon failed to start" error. To fix this, change the HTTP port settings in one of the configuration files.
Error: Exchange addresses need 64 hex character long payment IDs
This error occurs when the pool asks for the wallet address and PaymentID for the coin. You can specify them like this:
-u Wallet .
address PaymentID
Invalid address used for login
This error means that the address you are using is not a valid address for the pool. Check the url of the pool or try another pool.
CPU power
The program sets the processor power to 75% by default, which means that your processor is overheating. If you know what you are doing and want to get the most out of the CPU, then you can edit the values max-cpu-usage
.
If you are allowing your processor to run on a farm, make sure you control its temperature.
Stream settings for CPU
We have explained these settings for the GPU above, but you can also set threads for the CPU. For example, if you are using a powerful processor like AMD Ryzen Threadripper, you can go up to 32 threads.
"threads": 4,
If you are a beginner and do not know what this is, then change the safe settings to true
. By doing this, XMRig will automatically set the optimal settings.
Hashrate check
You can check the hash rate, results and status of your video cards using two methods. The first is from the program console, and the second is from the API. By default, XMRig displays a hash rate every 60 seconds, which you can change in the "print-time" settings.
Commands: hashrate, health, pause, resume
Also, in the active window of the program, click:
- "H" to display the hash rate,
- press "e" to display the health of your GPU,
- then "p" to pause
- "R" to resume.
If the miner send shares to the pool, then he reports " accepted
". If it says " rejected
", then there is something wrong with your configuration. Review it.
Built-in benchmark
You can start XMRig using the following commands:
xmrig --bench=1M
xmrig --bench=10M
xmrig --bench=1M -a rx/wow
xmrig --bench=10M -a rx/wow
Depending on the settings of the bench
command, it will run from 1 to 10 million RandomX hashes and display the time it took. The first two teams use the Monero variant (2 MB per thread, best suited for Zen2/Zen3 processors), the second two teams use the Wownero variant (1 MB per thread, best suited for first generation Intel and Zen/Zen+ processors).
The checksum of all hashes will also be displayed to check the stability of your hardware: if it is green, then everything is correct, if it is red, then a hardware error occurred during the calculations. No Internet connection is required to run the test.
Double check that you see Huge pages 100%
for both the dataset and all threads, and also check that msr register values ... has been set successfully
- without this, the result will not be the best. To properly configure MSR and Huge pages, you must run as administrator.
Benchmark with custom configuration
You can run the test in any configuration. Just run without command line options, use a regular config.json file and add "benchmark": "1M",
on the next line after the pool URL.
Stress test
You can also run a continuous stress test, which is as close as possible to real RandomX mining and does not require any settings:
xmrig --stress
xmrig --stress -a rx/wow
This will require an internet connection and will run indefinitely.
How to remove
- Open task manager. Right-click on the
xmrig.exe
process and select "open file location". - Try to delete all associated files.
- It happens that it is impossible to delete a file because it is running; end the process first.
- The files should now be deleted successfully.
- Reboot your computer to ensure that the miner is completely removed.
- Check the task manager after rebooting to make sure the miner is not present.
If you still have difficulties with launching, write to us in the comments - we will help!
In the archive with the program you will find full instructions in Russian, as well as examples of settings for different coins.
Download
Download for Windows
6.21.3
6.18.0
5.5.1
5.1.1
5.1.0
2.14.6
2.14.5
2.14.4
2.14.1
2.14.0
2.13.0
2.12.0
2.11.0
2.10.0
2.9.4
2.9.3
2.9.1
2.8.6
2.8.5
2.8.4
2.8.3
2.8.1
Download for Linux:
Version history 5.0.1
- Support for variants of the RandomX algorithm
2.14.6
- Fixed several network bugs.
2.14.5
- fixed compatibility with latest AMD drivers
2.14.4
- Added memory leak bypass for some drivers.
- The HTTP API now uses an unknown hash rate of null instead of 0.0.
- Fixed MSVC 2019 version detection.
- Removed outdated automatic options.
2.14.1
- Fixed macOS support.
- fixed autoconf for cn / r and other recently added algorithms.
- Fixed memory leak when using cn / r algorithm.
2.14.0
- Added new cryptonight / rwz algorithm, short alias cn / rwz (also known as CryptoNight ReverseWaltz), for the upcoming Graft fork.
- Added new cryptonight / zls algorithm, cn / zls short alias for Zelerius Network fork.
- Added new cryptonight / double algorithm, cn / double short alias (also known as CryptoNight HeavyX) for X-CASH.
- The minimum required CUDA version has been increased to 8.0 due to the lack of nvrtcAddNameExpression support in CUDA 7.5.
- Fixed hashrate crash if AVX was disabled at OS level.
- Fixed compilation error on some Linux.
- Added support for inline config.
In version 2.13.0
Added support for the new cryptonight / r algorithm (also known as CryptoNightR or CryptoNight Option 4) for the upcoming Monero fork on March 9th.
Added support for reloading dynamic pools.
In version 2.12.0
- Added support for the new cryptonight / wow algorithm (also known as CryptonightR) for the upcoming February 14 Wownero fork.
- Improved performance of the cryptonight / gpu algorithm.
In version 2.11.0
- Added support for the new cryptonight / gpu algorithm for the upcoming Ryo fork on February 14th.
In version 2.10.0
- Added new cn-pico / trtl (cryptonight-turtle, cn-trtl) algorithm for the upcoming TurtleCoin (TRTL) fork.
In version 2.9.4
- Fixed support for Masari (MSR) (this update is required for an upcoming fork).
In version v2.9.3
- Added support for the new cn / half algorithm for Masari and Stellite forks.
- Fixed bugs of video cards with worksize! = 8 for cn-heavy.
- Fixed cn / half compute errors
Happy mining!