XMRig setup and tuning
Download and verify XMRig, a minimal config, huge pages, and the donation setting.
10 min read · checked 2026-10-30
Download
Get XMRig only from xmrig.com or github.com/xmrig/xmrig/releases and compare the SHA-256 with the published one. Antivirus tools often flag miners; never download "unlocked" or repackaged builds.
Minimal config.json
{
"autosave": true,
"cpu": { "enabled": true, "huge-pages": true },
"randomx": { "1gb-pages": false },
"donate-level": 1,
"pools": [
{ "url": "pool.example.com:3333", "user": "YOUR_XMR_ADDRESS", "pass": "rig1", "tls": false }
]
}For P2Pool, the pool url is 127.0.0.1:3333 (your own P2Pool). The default donate-level of 1% goes to XMRig's developers.
Huge pages (Linux)
sudo sysctl -w vm.nr_hugepages=1280 # ~2.5 GB of 2 MB pages; adjust to threads
echo 'vm.nr_hugepages=1280' | sudo tee /etc/sysctl.d/60-hugepages.conf
# XMRig prints "huge pages 100%" when it worked. Running XMRig as root also enables the MSR mod (extra speed on many CPUs).Troubleshooting
- Low hashrate: check huge pages %, thermal throttling, and threads (≈ L3 MB / 2)
- Rejected shares: unstable overclock or wrong algorithm/port
- Connection errors: firewall, wrong port, or TLS mismatch
- Laptop: expect throttling; mining on battery is a bad idea