To allocate four 1GB hugepages, you should append this to the kernel commandline when booting:
default_hugepagesz=1G hugepagesz=1G hugepages=4
To permanently add this to the kernel commandline, append it to GRUB_CMDLINE_LINUX in /etc/default/grub and then execute:
$ grub2-mkconfig -o /boot/grub2/grub.cfg
Reboot to make sure it worked. After rebooting, you can also use the following command to change the number of hugepages to N
$ sysctl -w vm.nr_hugepages=N
$ mkdir /dev/hugepages1G
$ mount -t hugetlbfs -o pagesize=1G none /dev/hugepages1G
https://dpdk-guide.gitlab.io/dpdk-guide/setup/hugepages.html