If your XMRig log shows huge pages 0%, HUGE PAGES unavailable or msr cannot set MSR, the miner is running, but RandomX is working without two features XMRig is designed to use. This guide is for people mining Monero or another RandomX coin on their own CPU. It covers what each log line means, how to fix it on Windows and Linux, and when the fix will not work.
Short answer: on Windows, run XMRig as Administrator once and reboot. On Linux, run it with root privileges, or reserve the pages yourself with sudo sysctl -w vm.nr_hugepages=1280. MSR needs the same admin/root rights, and on some machines Secure Boot has to be turned off.
Checked: 26 October 2026 against the official XMRig documentation, for XMRig 6.26.0 (released 28 March 2026). Tested: Not tested yet. We have not run these steps on our own hardware, so we report what the documentation says and do not quote our own hashrate figures. Soft4Mining Editorial.
What huge pages and MSR mean in XMRig
Huge pages are large memory pages. Windows calls them Large Pages, BSD and macOS call them Super Pages, and XMRig calls them huge pages on every platform. RandomX keeps a dataset of roughly 2 GB in memory and reads it at random, so mapping that memory with large pages cuts address-translation overhead. According to XMRig’s documentation, the typical gain is 20–30% for most CPU algorithms and up to 50% for RandomX. Your result depends on the CPU, memory and operating system.
MSR means model-specific registers, the CPU settings that control hardware prefetchers. RandomX reads memory at random, so prefetchers do not help it, and XMRig’s guide says they should be disabled for the best RandomX performance. XMRig writes these registers itself when it has admin rights (Windows) or root (Linux). It puts the original values back when it exits, and a reboot clears every change anyway.
Read the log first
| Log line | Meaning | What to do |
|---|---|---|
HUGE PAGES permission granted | Windows: the account has the lock-memory privilege | Nothing; check the percentage line |
huge pages 100% | The whole RandomX dataset sits in huge pages | Nothing |
huge pages 0% or unavailable | No privilege (Windows) or no reserved pages (Linux) | Follow the Windows or Linux section below |
huge pages under 100% | Part of the memory was not available as huge pages | Reboot and start the miner before other heavy apps; on Linux, reserve more pages |
msr register values for "intel" preset has been set successfully (or “ryzen_…”) | MSR change applied | Nothing |
msr cannot read/set MSR or no msr line | No admin/root rights, CPU not supported, or blocked by Secure Boot | See “Fix MSR” below |
The miner prints these lines at startup and again when RandomX initialises its dataset.
Fix “huge pages unavailable” on Windows
Windows uses huge pages only when the account running the miner holds the Lock pages in memory privilege (SeLockMemoryPrivilege). Both ways to get it need administrator rights.
Option 1: run as Administrator once
- Right-click
xmrig.exeand choose Run as administrator. - Close the miner and reboot the PC. The privilege takes effect for new sessions only.
- Start XMRig normally and check that the log shows
permission grantedandhuge pages 100%.
XMRig’s documentation says that on Windows 10 and later you no longer need admin rights once the privilege is granted. On Windows 7 you do.
Option 2: grant the privilege manually
- Press Win+R and run
gpedit.msc. On Home editions, which have no Group Policy editor, use Option 1. - Open Computer Configuration → Windows Settings → Security Settings → Local Policies → User Rights Assignment.
- Double-click Lock pages in memory, choose Add User or Group… and add the account that runs the miner.
- Click OK and reboot.
Still below 100% on Windows
Windows cannot reserve huge pages in advance, so other programs can fragment memory and the miner gets fewer pages than it asked for. The documented fix is a reboot, then starting the miner before browsers or games. If you switch algorithms often and keep losing pages, set "memory-pool": true in the cpu object of config.json. Also keep in mind that 4 GB of RAM may not be enough for Windows and the RandomX dataset at the same time.
Fix huge pages on Linux
Since XMRig 5.2.0, running the miner as root needs no manual setup: it reserves the exact number of pages it needs. If you run it as a normal user, reserve the pages yourself.
Reserve pages until the next reboot
sudo sysctl -w vm.nr_hugepages=1280Reserve pages permanently
sudo bash -c "echo vm.nr_hugepages=1280 >> /etc/sysctl.conf"XMRig recommends 1280 pages per NUMA node for RandomX and 128 per system for other algorithms. Pages are 2 MB each, so 1280 pages lock away 2560 MB that other programs can no longer use. On a two-socket server (two NUMA nodes), double the number. Check what the kernel actually reserved with:
grep Huge /proc/meminfoIf HugePages_Total is lower than the number you asked for, memory was already fragmented. Set the value in /etc/sysctl.conf and reboot, so the reservation happens before other services start.
1 GB huge pages (Linux only)
Since 5.2.0, XMRig can put the RandomX dataset in 1 GB pages instead of 2 MB pages. The documentation puts the extra gain at 1–3% on top of regular huge pages, depending on the CPU. The cost is higher memory use: 3 GB (three 1 GB pages) per NUMA node. The feature is off by default. Enable it in the randomx object:
"randomx": {
"1gb-pages": true
}As root, nothing else is needed. Otherwise, the XMRig source tree includes scripts/enable_1gb_pages.sh, which you run with sudo. The CPU must support 1 GB pages. Check for the pdpe1gb flag in /proc/cpuinfo.
Fix MSR (“cannot set MSR”)
- Rights: run XMRig as Administrator on Windows, or as root on Linux. Without them the miner cannot touch the registers.
- Supported CPUs: Intel Nehalem and newer, and all Zen-based AMD CPUs (Ryzen, Threadripper, EPYC). Older or other CPUs get no MSR line.
- Secure Boot: XMRig’s documentation notes that some hardware and software combinations only allow the MSR change with Secure Boot disabled. Only do this on a machine you own and administer.
- Windows driver: on Windows, XMRig writes MSR through the signed WinRing0 driver. Security software may flag or block that driver, and the miner then reports that it cannot set MSR. Decide whether you trust the build (see the next section) before you make any exception.
- Linux by hand: the source tree includes
scripts/randomx_boost.sh(run with sudo). The documentation does not recommend manual MSR setup on Windows.
The relevant config.json options live in the randomx object:
"randomx": {
"wrmsr": true,
"rdmsr": true
}"wrmsr": true (the default) turns the MSR feature on, and false turns it off. "rdmsr": true (the default) restores the original values when the miner exits. On Intel, wrmsr also accepts a number, 15 by default. XMRig also documents raw register arrays for Intel and the Zen generations; leave those alone unless you know exactly why you need them.
Before you change anything: verify the download
Many antivirus products flag XMRig, because malware often bundles it for hidden mining. Download it only from the official XMRig release page and compare the file with the published SHA256SUMS before you run it as Administrator or root. Run it only on hardware you own or are allowed to use. Our XMRig page lists the current version and platforms, and the default 1% donation level, which you can only remove by building from source.
Related settings that affect RandomX
- Fewer threads than cores: XMRig plans for 2 MB of L3 cache and 256 KB of L2 cache per RandomX thread, so on most CPUs it does not use every thread. That is expected, not a fault.
- Memory channels: the RandomX guide says a single DDR4 channel tops out around 4000–6000 H/s and DDR3 around 1500–2000 H/s, so single-channel RAM can cap your speed whatever you do with huge pages.
- Light mode:
"mode": "light"needs only 256 MB, but the documentation calls it very slow. Use it only when memory is the real limit. - CPU settings in BIOS: if you tune memory or CPU settings for mining, Windows tools such as Quick CPU show and adjust core parking, power plans and CPU temperature. Change one thing at a time and keep notes.
Services such as unMineable and Kryptex have their own setup. If you point XMRig at them for CPU mining, the same log lines and fixes apply.
FAQ
Why does XMRig say “huge pages unavailable” even though I ran it as admin?
On Windows the privilege only takes effect after a reboot. Run as Administrator once, reboot, then check the log. On Linux, “unavailable” usually means no pages are reserved. Run the sysctl command above, or start the miner as root.
How many huge pages does XMRig need?
For RandomX, XMRig suggests 1280 pages of 2 MB (2560 MB) per NUMA node. Other algorithms need 128 per system. With 1 GB pages, plan for 3 GB per NUMA node.
Is it safe to let XMRig change MSR registers?
The changes are not permanent. XMRig restores the original values on exit by default, and a reboot resets them. The risks are giving any program admin or root rights and, on some systems, turning off Secure Boot. So use an official, checksum-verified build on your own machine.
Does XMRig huge pages work on macOS?
The documentation describes huge pages setup for Windows and Linux, and 1 GB pages only for Linux. We found no macOS setup steps in the official docs, so do not expect the same results there.
Do huge pages matter for GPU mining?
The setting is part of XMRig’s CPU backend and the RandomX dataset. GPU miners such as Rigel or OneZeroMiner do not use it.
Will this make CPU mining profitable?
Huge pages and MSR only take away bottlenecks inside the miner. Whether mining pays depends on your power price, hardware and the coin price, and we do not publish earnings estimates.
Sources: xmrig.com/docs/miner/hugepages; xmrig.com/docs/miner/randomx-optimization-guide and its MSR page; xmrig.com/docs/miner/config/cpu; github.com/xmrig/xmrig releases (6.26.0, 28 March 2026); Microsoft Learn, “Enable the Lock pages in memory option”.
Last updated: 26 October 2026 · soft4mining editorial team. Licence, version and platform details are checked against each developer's official documentation.
