How to enable 1GB hugepages support for xmrig?

I am unable to include support for 1GB hugepages
Any command or modification in config that will help to acheive the former will be appreciated

I have tried this

sysctl -w vm.nr_hugepages=$(nproc)

for i in $(find /sys/devices/system/node/node* -maxdepth 0 -type d);
echo 3 > "$i/hugepages/hugepages-1048576kB/nr_hugepages";

But it does not works

Other method suggested was to edit etc/sysconfig/grub and add [default_hugepagesz=1G]
Problem is I cant find any file like this

What makes you conclude that this is not enabled?

That would seem to be setting a number of "hugepages"? The command also uses POSIX syntax which Fish doesn't support.

This is a Red Hat-type distribution file location.


It is not enabled because

# grep Hugepagesize: /proc/meminfo
Hugepagesize:       2048 kB
1 Like

OK so reading it says:

so are you sure that your CPU supports 1G pages?


CPU supports it because this command
cat /proc/cpuinfo | egrep -o pdpe1gb | head -n 1
gives output

1 Like

OK, so there are a couple of steps.

Firstly, change the kernel's default size by passing at a kernel boot parameter. Edit /etc/default/grub and append hugepagesz=1GB to the GRUB command line, for example:

GRUB_CMDLINE_LINUX="... hugepagesz=1GB"

Then update your GRUB boot menu, e.g. run sudo grub-mkconfig -o /boot/grub/grub.cfg . AND REBOOT.

Next, make sure your system is actually set up to use huge pages:


Next, make sure your system is actually set up to use huge pages:

I don't know what it means but adding hugepagesz=1GB has no effect

To what? I'm trying to help here but you're going to have to try to meet me half way...

1 Like

I am trying to enable 1gbpag3 for xmrig

Still xmrig says 1gb page is supported but when I run it says failed to allocate RandomX dataset using 1GB pages

Also grep Hugepagesize: /proc/meminfoHugepagesize: 2048 kB

I'd suggest you start with one of their official contact points:


Now, my pages are HUGE!

Oracle has some stuff on 1G hugepages.

1 Like

Adding support for 1gb_huge_pagez

1)Edit /etc/default/grub by using nano from terminal

sudo nano /etc/default/grub

Navigate to GRUB_CMDLINE_LINUX and append default_hugepagesz=2M hugepagesz=1G hugepages=3

  1. Update grub using command

sudo grub-mkconfig -o /boot/grub/grub.cfg


  1. ?????

  2. Profit


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.