Updated: 28 September 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9

With HugePages configured, you may want to know how many a particular process uses. These methods work on Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9.

System totals

grep -i huge /proc/meminfo

Per process: explicit HugePages (hugetlbfs)

awk '/Hugetlb/ {sum += $2} END {print sum " kB"}' /proc/1234/smaps

This adds the Private_Hugetlb and Shared_Hugetlb values for process 1234 (replace with your PID). numastat -p 1234 (package numactl) shows the same per NUMA node in the Huge row.

Per process: transparent huge pages (THP)

awk '/AnonHugePages/ {sum += $2} END {print sum " kB"}' /proc/1234/smaps

Databases such as Oracle, PostgreSQL or Java applications often use explicit HugePages; ordinary processes may use THP automatically. Check the THP mode with cat /sys/kernel/mm/transparent_hugepage/enabled.

Reserve HugePages

echo 'vm.nr_hugepages = 1024' > /etc/sysctl.d/90-hugepages.conf
sysctl --system
grep HugePages_Total /proc/meminfo

1024 pages of 2 MB reserve 2 GB of RAM that normal programs cannot use, so size it for the application that needs it.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Linux server management

hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.

Was this answer helpful?

Still stuck? Open a ticket