How do I enable 1GB huge pages for XMRig?
To enable 1GB huge pages in XMRig, you need Linux, a processor that supports them, and enough memory reserved as 1GB pages. Then turn on "1gb-pages": true in XMRig’s configuration and restart the miner.
Check support and available memory
Huge pages are larger blocks of memory than Linux normally uses. They can reduce memory-management work while XMRig runs RandomX, Monero’s mining algorithm. Compared with ordinary 2MB huge pages, the extra speed gain is usually modest—not a dramatic upgrade.
XMRig’s 1GB-page feature is Linux-only. These steps apply to the installed XMRig program, not a browser miner.
On an x86-64 computer, check processor support:
grep -m1 -o pdpe1gb /proc/cpuinfo
If you see pdpe1gb, your processor reports support. Your Linux kernel must support 1GB huge pages too.
Plan to reserve 3GB per memory node used by XMRig. A memory node, also called a NUMA node, is a group of memory associated with a processor. Most everyday computers have just one. Leave enough unreserved RAM for Linux and your other programs.
Reserve the pages in Linux
For a typical computer with one memory node, try reserving three 1GB pages:
echo 3 | sudo tee /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/nr_hugepages
Check what Linux actually reserved:
cat /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/nr_hugepages
You want the result to be 3. The folder uses kilobytes, so 1048576kB means 1GB.
If the folder is missing, your system may not expose support for that page size. If the result is below three, Linux could not reserve enough large, continuous blocks of memory. This can happen even when plenty of RAM appears free.
For a multi-node machine, inspect the corresponding node1, node2, and other folders. Reserve memory on the nodes XMRig will use; three pages on one node do not cover every node.
Make the reservation survive a restart
The command above does not make a permanent reservation. Reserving pages at startup is also more reliable because memory has not yet become fragmented.
On a typical single-node Ubuntu or Debian system using GRUB, the startup menu program, edit /etc/default/grub. Add these options inside the existing GRUB_CMDLINE_LINUX_DEFAULT quotes, preserving its other options:
hugepagesz=1G hugepages=3
Then run:
sudo update-grub
sudo reboot
Other distributions may use different steps. Multi-node systems also need an appropriate allocation across nodes, rather than blindly using this single-node example.
Reserved huge-page memory is unavailable for ordinary applications. Remove the startup options and regenerate the GRUB configuration if you later want that memory back.
Enable XMRig and verify it
Merge these settings into your existing config.json; do not replace the whole file:
{
"randomx": {
"1gb-pages": true
},
"cpu": {
"huge-pages": true
}
}
Alternatively, enable the RandomX setting with the command-line option:
./xmrig --randomx-1gb-pages
Restart XMRig and inspect its startup output. Check both the 1GB pages status and the RandomX memory-allocation messages. A generic “huge pages 100%” message alone does not prove 1GB pages are being used—it can describe ordinary 2MB pages.
The bottom line
Reserve the memory, enable XMRig’s setting, and verify the allocation. If memory is tight, ordinary 2MB huge pages are usually the better trade-off.
