How do I enable huge pages for XMRig on Windows?
To enable huge pages for XMRig on Windows, leave "huge-pages": true in your XMRig configuration, then run XMRig as administrator. XMRig can usually grant the required Windows permission automatically; restart Windows if prompted, then check XMRig’s startup output to confirm huge pages are actually being used.
1. Check your XMRig configuration
Huge pages let XMRig use larger chunks of memory instead of many small ones. This reduces memory-management work and can improve performance with RandomX, the mining algorithm Monero uses.
Open XMRig’s config.json file in a text editor. Find the existing "cpu" section and make sure it includes:
"cpu": {
"enabled": true,
"huge-pages": true
}
This is just the relevant part of the configuration, not a replacement for the whole file. Keep your other CPU settings and make sure commas between settings remain correct.
Huge pages are normally enabled by default in XMRig. If you start XMRig with command-line options, also check that you are not using --no-huge-pages, which disables them.
2. Run XMRig as administrator
Stop any running copy of XMRig first. Then:
- Right-click
xmrig.exe, or the shortcut or batch file you use to launch it. - Select Run as administrator.
- Approve the Windows permission prompt.
- Read the startup messages.
On its first elevated run, XMRig normally attempts to grant your Windows account the Lock pages in memory permission. This lets a program reserve memory that Windows will not move out to disk.
If XMRig says a reboot is required, restart Windows. Then launch XMRig again as administrator and check the output.
Only give administrator access to a trusted copy of XMRig obtained from the official project. A mining program from an unknown download site could be malicious.
3. Set the permission manually if needed
If the automatic setup does not work, you can grant the permission yourself on Windows editions that include the Local Security Policy tool:
- Press Windows + R.
- Type
secpol.mscand press Enter. - Open Local Policies → User Rights Assignment.
- Double-click Lock pages in memory.
- Choose Add User or Group and add the Windows account that runs XMRig.
- Apply the change and restart Windows.
The permission must belong to the account actually running the miner. Giving it to a different administrator account will not necessarily help.
Windows Home often lacks this policy editor. Try XMRig’s automatic administrator setup instead. On a work-managed computer, policy restrictions may prevent changes; ask the administrator rather than trying to bypass them.
4. Confirm allocation, not just permission
Look for two things in XMRig’s startup output:
- Huge-page support or permission: a message such as
HUGE PAGES permission granted. - Actual allocation: RandomX and CPU initialization lines showing
huge pages 100%.
Permission alone does not prove allocation succeeded. If usage is partial or zero, restart Windows and launch XMRig before opening memory-heavy programs. Available RAM and memory fragmentation—free memory split into scattered pieces—can affect allocation.
Do not chase XMRig’s 1 GB pages setting on Windows. That option is Linux-specific and is not required for ordinary Windows huge pages.
The bottom line
Enable huge pages in the configuration, run XMRig as administrator, and reboot if needed. The clearest confirmation is huge pages 100% in the allocation output—not simply “permission granted.”
