RandomX Optimization Guide
This page not finished yet.
Memory size requirements
- 2080 MB per NUMA node for dataset, 1 NUMA node usually equal to 1 CPU socket, the miner show number of nodes on startup.
- 256 MB for cache on first NUMA node.
- 256 KB of L2 cache and 2 MB of L3 cache per 1 mining thread.
CPU cache requirements is the main reason why the miner not use all threads on most CPUs (very popular question). On Windows 4GB memory may not enough system and miner.
There are several ways to increase or reduce memory requirements:
- 1GB huge pages on Linux, increases memory requirements to 3GB (3 pages) per NUMA node and increases the hashrate by 1-3%.
- Disable NUMA support by
"numa": false in
"randomx" object, miner will use only 1 dataset, but it reduce hashrate significantly, if you have only 1 NUMA node this option has no effect.
- RandomX light mode, reduces memory requirements to 256 MB but this mode very slow, can be enabled by
"mode": "light", in
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)
Huge Pages can increase RandomX performance up to 50%, 1GB huge pages (Linux only) increase hashrate by an additional 1-3% on top of regular huge pages.
Hardware prefetchers MSR mod
You must disable hardware prefetchers to get the optimal RandomX performance.
Experimental feature to disallow all CPU cores which are not mining to not have access to L3 cache which reduce interference with mining.