All CPU related settings contained in cpu and randomx objects in the config file, CPU backend allow specify multiple profiles and allow switching between them without restrictions by pool request or config change. Default auto-configuration creates a reasonable minimum of profiles which cover all supported algorithms. For example if you like to change threads count for RandomX algorithm you should edit profile rx in cpu object of the config file.
{
"cpu": {
"enabled": true,
"rx/wow": [-1, -1, -1, -1],
"cn": [
[1, 0],
[1, 2]
],
"cn-lite": [
[2, 0],
[2, 2]
],
"cn-pico": {
"intensity": 2,
"threads": 8,
"affinity": -1
},
"custom-profile": [0, 2],
"*": [-1],
"cn/r": "custom-profile",
"cn/0": false
}
}
Threads can be defined in 3 formats.
[
[1, 0],
[1, 2],
[1, -1],
[2, -1]
]
Each line represents one thread, the first element is intensity, this option was known as low_power_mode
, possible value range from 1
to 5
, second element is CPU affinity, special value -1
means no affinity.
[-1, -1, -1, -1]
Each number represents one thread and means CPU affinity, this is the default format for algorithms with maximum intensity 1, currently it is all RandomX variants and all Argon2 variants.
{
"intensity": 2,
"threads": 8,
"affinity": -1
}
Internal format, but can be user defined.
Options below contained in cpu object in the config file.
Enable or disable CPU mining backend.
Enable or disable huge pages support.
On Linux this option also accepts huge page size in kB to use custom huge page sizes if it is supported by hardware. For example "huge-pages": 32768
for 32 MB huge page size. #2076
Enable or disable huge pages support for RandomX JIT code. It gives a very small boost on Ryzen CPUs, but hashrate is unstable between launches. Use with caution. #1876
Force enable or disable hardware AES support. Default value null
means miner autodetect this feature. Usually you don't need to change this option, this option is useful for some rare cases when XMRig can't detect hardware AES, but it is available. If you force enable this option, but your hardware does not support it, the miner will crash.
Mining threads priority, value from 1
(lowest priority) to 5
(highest possible priority). Default value null
means XMRig doesn't change threads priority at all. Setting priority higher than 2
can make your PC unresponsive.
Use continuous, persistent memory block for mining threads, useful for preserving huge pages allocation while algorithm switching. Possible values false
(feature disabled, by default) or true
or specific count of 2 MB huge pages. It helps to avoid loosing huge pages for scratchpads when RandomX dataset is updated and mining threads restart after 2-3 days of mining.
Prefer system better system response/stability true
(default value) or maximum hashrate false
.
This option (was known as max-cpu-usage
) is the most confusing option in the miner with many myths and legends. This option is just a hint for automatic configuration and can't precisely define CPU usage.
"autosave":false
.Enable/configure or disable assembly optimizations. Possible values: true
, false
, "intel"
, "ryzen"
, "bulldozer"
.
Allow override automatically detected Argon2 implementation, this option added mostly for debug purposes, default value null
means autodetect. This is used in RandomX dataset initialization and also in some other mining algorithms. Other possible values: "x86_64"
, "SSE2"
, "SSSE3"
, "XOP"
, "AVX2"
, "AVX-512F"
. Manual selection has no safeguards - if your CPU doesn't support required instructions, the miner will crash.
Options below contained in cpu object in the config file.
All these options are generated for current CPU(s) and not portable for systems with different CPU(s). To prevent write generated profiles to config use global option "autosave": false
.
Generated profile for Argon2 algorithms.
Generated profile for all CryptoNight algorithms with 2 MB scratchpad size.
Generated profile for all CryptoNight-Heavy algorithms with 4 MB scratchpad size.
Generated profile for all CryptoNight-Lite algorithms with 1 MB scratchpad size.
Generated profile for all CryptoNight-Pico algorithms with 256 KB scratchpad size.
Generated profile for all RandomX algorithms with 2 MB scratchpad size.
Generated profile for RandomWOW algorithm and also used for other RandomX algorithms with less than 2 MB scratchpad size.
Original CryptoNight algorithm disabled by default.
Original CryptoNight-Lite algorithm disabled by default.
RandomARQ usually uses alias to rx/wow profile.
RandomKEVA usually uses alias to rx/wow profile.
Options below contained in randomx object in the config file.
Thread count to initialize RandomX dataset. Auto-detect (-1
) or number of threads.
Use AVX2 for dataset initialization. Faster on some CPUs. Auto-detect (-1
), disabled (0
), always enabled on CPUs that support AVX2 (1
).
RandomX mining mode: "auto"
, "fast"
(2 GB memory), "light"
(256 MB memory).
Use 1GB hugepages for RandomX dataset (Linux only). It gives 1-3% speedup.
Restore MSR register values to their original values on exit. Used together with wrmsr
.
Enable or disable MSR mod. It gives up to 15% speedup depending on your system. For advanced values follow MSR documentation.
Enable or disable Cache QoS. It's useful when you can't or don't want to mine on all CPU cores to make mining hashrate more stable. #1774
Enable or disable NUMA support (better hashrate on multi-CPU servers and Ryzen Threadripper).
Which instruction to use in RandomX loop to prefetch data from scratchpad. 1
is default and fastest in most cases. Can be off (0
), prefetcht0
instruction (1
), prefetchnta
instruction (2
, a bit faster on Coffee Lake and a few other CPUs), mov
instruction (3
). #1823