| Tested on | RHEL 10.2 (Coughlan) |
|---|---|
| Package | kernel-6.12.0-211.47.1.el10_2.x86_64grub2-tools-2.12-46.el10_2.x86_64 |
| Applies to | RHEL, Rocky Linux, AlmaLinux, CentOS Stream, and other RHEL-family releases with GRUB2 and BLS boot entries |
| Privilege | sudo or root for grubby and reboot |
| Scope | Verify x86_64 CPU capability for static HugeTLB sizes (2 MB and 1 GB), read the kernel-exposed sizes and default Hugepagesize, and set default_hugepagesz= with grubby. Does not cover reserving a page pool (hugepages=, nr_hugepages) or Transparent HugePages policy — see Related guides. |
| Related guides | HugePages vs Transparent HugePages Configure Transparent HugePages on RHEL 8–10 Configure static HugePages on RHEL 7 Configure GRUB2 on RHEL Check Transparent HugePage usage per process |
Static HugePages (HugeTLB) use larger memory pages than the normal 4 KB pages. Workloads that need predictable huge pages use a managed pool; that is separate from Transparent HugePages, where the kernel may promote memory automatically.
At boot the kernel picks a default hugepage size, usually 2 MB on typical x86_64 systems. You can change that default with grubby and a reboot when the CPU exposes the size you need.
The checks and 2 MB outputs below were tested on RHEL 10.2 after a reboot. This test CPU does not expose 1 GB HugePages (pdpe1gb is missing), so the 1 GB grubby workflow is for systems where that flag is present and hugepages-1048576kB appears under /sys/kernel/mm/hugepages/.
Quick answer: check support and read the default size
default_hugepagesz= chooses which HugeTLB page size the kernel treats as the default. It does not create or reserve a HugePages pool. To reserve pages, use hugepages= (often with hugepagesz=) or configure nr_hugepages separately.
On x86_64, CPU flags are a quick hardware check:
grep -qw pse /proc/cpuinfo && echo '2MB hugepages: supported' || echo '2MB hugepages: not supported'Check 1 GB support the same way:
grep -qw pdpe1gb /proc/cpuinfo && echo '1GB hugepages: supported' || echo '1GB hugepages: not supported'The running kernel must also expose that size. List registered HugeTLB sizes before you change boot parameters:
ls /sys/kernel/mm/hugepages/See which default size is active today:
grep Hugepagesize /proc/meminfoTo persist a new default on RHEL 8–10, add a kernel argument and reboot only when the CPU supports that size and the running kernel exposes it under /sys/kernel/mm/hugepages/:
sudo grubby --update-kernel=ALL --args="default_hugepagesz=1G"On x86_64, do not set default_hugepagesz=1G unless pdpe1gb is present and you see hugepages-1048576kB under /sys/kernel/mm/hugepages/ after boot on that platform (or you have confirmed the same on identical hardware).
What “default HugePage size” means
A system can support more than one HugeTLB page size at the same time. On x86_64, 2 MB and 1 GB are the usual choices. default_hugepagesz= picks which supported size is the default for HugeTLB operations. It does not remove the other size; you can still add another pool with hugepagesz= and hugepages= at boot if the kernel exposes both sizes.
The same size shows up in different forms depending on where you look:
| Where | 2 MB example | 1 GB example |
|---|---|---|
| Kernel boot argument | 2M or default_hugepagesz=2M |
1G or default_hugepagesz=1G |
/proc/meminfo |
Hugepagesize: 2048 kB |
Hugepagesize: 1048576 kB |
| sysfs | hugepages-2048kB |
hugepages-1048576kB |
Boot parameters: default vs reservation
| Parameter | What it does |
|---|---|
default_hugepagesz=1G |
Selects the default HugeTLB page size |
hugepagesz=1G |
Selects a page size for the following reservation |
hugepages=4 |
Reserves four pages of the selected or default size |
Example from kernel documentation (multiple pools at boot): hugepagesz=2M hugepages=10 hugepagesz=1G hugepages=1 alongside default_hugepagesz= when you need a specific default. Pool sizing is covered in Configure static HugePages on RHEL 7.
Static HugePages vs Transparent HugePages
| Topic | Static HugeTLB (this article) | Transparent HugePages (THP) |
|---|---|---|
| Who allocates | HugeTLB pages come from an explicitly managed pool and are used by workloads configured for HugeTLB | Kernel may promote memory automatically |
| Size control | default_hugepagesz=, hugepagesz=, hugepages= boot parameters |
transparent_hugepage= and sysfs under /sys/kernel/mm/transparent_hugepage/ |
| Typical check | Hugepagesize in /proc/meminfo |
cat /sys/kernel/mm/transparent_hugepage/enabled |
THP is a different knob. For always, madvise, or never, see Configure Transparent HugePages on RHEL 8–10.
Check if the CPU supports 2 MB HugePages
On x86_64, the pse flag indicates support for 2 MB pages. A simple yes/no check is:
grep -qw pse /proc/cpuinfo && echo '2MB hugepages: supported' || echo '2MB hugepages: not supported'2MB hugepages: supportedCheck if the CPU supports 1 GB HugePages
The pdpe1gb flag means 1 GB huge pages are supported on x86_64. Many laptops and VMs do not expose it to the guest.
grep -qw pdpe1gb /proc/cpuinfo && echo '1GB hugepages: supported' || echo '1GB hugepages: not supported'1GB hugepages: not supported/sys/kernel/mm/hugepages/ before you rely on a 1 GB default at boot.
Check which HugeTLB sizes the kernel exposes
Sysfs lists every hugepage size the running kernel registered, not just the default:
ls /sys/kernel/mm/hugepages/hugepages-2048kBWhen pdpe1gb is absent, sysfs often lists only hugepages-2048kB. CPUs with 1 GB support can show both hugepages-2048kB and hugepages-1048576kB after boot.
Hugepagesize in /proc/meminfo shows the default HugeTLB size, not every size the system might support. Use sysfs when you need the full list.
grep Hugepagesize /proc/meminfoHugepagesize: 2048 kB2048 kB is the default on this boot (2 MB). That does not by itself mean 1 GB pages are impossible on every machine; it means the default is 2 MB here and sysfs only registered 2 MB pools on this host.
Check whether default_hugepagesz is already on the boot command line:
grubby --info=DEFAULT | grep '^args='args="ro resume=UUID=78531da6-a389-46e8-9bad-267572940826 rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet crashkernel=2G-64G:256M,64G-:512M $tuned_params"No default_hugepagesz entry is present, which matches the 2 MB default above.
Change the default hugepage size with grubby (RHEL 8–10)
On current RHEL releases, use grubby to update kernel arguments on the installed BLS boot entries. Do not hand-edit generated grub.cfg files. For the wider GRUB workflow, see Configure GRUB2 on RHEL.
Add default_hugepagesz for all installed kernels
When pdpe1gb is present and you want 1 GB as the default after the next reboot:
sudo grubby --update-kernel=ALL --args="default_hugepagesz=1G"To change only the kernel you boot by default:
sudo grubby --update-kernel="$(grubby --default-kernel)" --args="default_hugepagesz=1G"Before you reboot, make sure the argument landed on the boot entry:
grubby --info=DEFAULT | grep -E '^args=|default_hugepagesz'Reboot when you can afford a short outage; the new default applies only after the system comes back up:
sudo systemctl rebootVerify after reboot
After rebooting, check all three values so you know the new setting actually took effect:
Read the default HugeTLB size:
grep Hugepagesize /proc/meminfoHugepagesize: 2048 kBCheck whether default_hugepagesz is on the active kernel command line:
grep -o 'default_hugepagesz=[^ ]*' /proc/cmdline || echo 'default_hugepagesz not in cmdline'default_hugepagesz not in cmdlineList the hugepage sizes the kernel registered:
ls /sys/kernel/mm/hugepages/hugepages-2048kBWhen you set default_hugepagesz=1G on a CPU with pdpe1gb, the same checks should show Hugepagesize: 1048576 kB, default_hugepagesz=1G in /proc/cmdline, and a hugepages-1048576kB directory (often alongside hugepages-2048kB).
Remove or change the boot parameter
When you need to drop a previous value from every boot entry:
sudo grubby --update-kernel=ALL --remove-args="default_hugepagesz=1G"Replace 1G with the value you previously set. Reboot again for the running kernel to drop the override.
grubby, avoid manually editing generated grub.cfg files unless your platform documentation requires it.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
default_hugepagesz=1G has no effect |
CPU lacks pdpe1gb |
Stay on 2 MB default; confirm with grep pdpe1gb /proc/cpuinfo |
Hugepagesize unchanged after edit |
Reboot not done, or wrong boot entry | grubby --info=ALL, reboot, compare /proc/cmdline |
Only hugepages-2048kB under sysfs |
1 GB pages not exposed on this boot | Do not expect 1G defaults to apply; check CPU flags and sysfs |
CPU has pdpe1gb but no hugepages-1048576kB |
Hypervisor or platform hides 1 GB pages | Check VM CPU model, host features, and vendor docs before setting default_hugepagesz=1G |
HugePages_Total stays zero |
No pool reserved | default_hugepagesz only changes the default size; add hugepages= or nr_hugepages to reserve pages |
| THP still active after HugeTLB work | Separate feature | Tune THP with Transparent HugePages on RHEL 8–10 |
Summary
default_hugepagesz= sets which HugeTLB page size is the default; it does not reserve memory. On x86_64, use pse and pdpe1gb as quick CPU checks, then confirm what the kernel actually registered under /sys/kernel/mm/hugepages/. Hugepagesize in /proc/meminfo shows the default for this boot, not the only size your hardware class might ever support.
To change the default on future boots, append default_hugepagesz= with grubby, verify the boot entry, reboot, and run the checks above. On x86_64, choose a 1 GB default only when pdpe1gb is set and the kernel exposes hugepages-1048576kB. Reserving how many pages to allocate remains a separate step from picking the default size.
References
Frequently Asked Questions
What is the difference between Hugepagesize and HugePages_Total?
Hugepagesize shows the default HugeTLB page size for this boot. HugePages_Total, HugePages_Free, and related lines in /proc/meminfo refer to the pool for that default size, not a sum across every HugeTLB size on the system. If multiple sizes are active, inspect each directory under /sys/kernel/mm/hugepages/ for per-size pool counters.
Does default_hugepagesz reserve memory at boot?
No. It selects which hugepage size is the default for HugeTLB operations. You still reserve or allocate pages separately if your workload needs a fixed pool.
Can I use /etc/sysconfig/grub on RHEL 10?
On current RHEL releases, use grubby to update kernel arguments in the installed boot entries. The RHEL 7 /etc/sysconfig/grub workflow is obsolete for day-to-day kernel argument changes on RHEL 10.
Is checking pse enough on non-x86 architectures?
No. The flag names in this article apply to common x86_64 CPUs. Other architectures expose hugepage support through different CPU features and sysfs layouts; use your vendor’s documentation for ARM or other platforms.

