LSB_HUGETLB=Y|N
The information regarding which virtual memory page maps to which physical memory page is kept in a data structure named Page Table. Most architectures use a fast lookup cache named Translation Lookaside Buffer (TLB). Consequently, TLB misses bring additional performance costs, so it is important to reduce TLB misses.
In advanced architectures like x86 or IA64, huge page size is supported (e.g., 2 Mb and 4 Mb sizes). The number of memory pages can be reduced through implementing the huge page size, which leads to decreased TLB misses and improved performance for processes like forked child, etc.
To configure huge page memory:
Check the support and configuration of huge page size:
cat /proc/meminfo | grep Huge
The output of cat /proc/meminfo will include lines such as:
HugePages_Total: vvv
HugePages_Free: www
HugePages_Rsvd: xxx
HugePages_Surp: yyy
Hugepagesize: zzz kB
Where:
Configure the number of huge size pages:
To set the number of huge pages using /proc entry:
# echo 5 > /proc/sys/vm/nr_hugepages
To set the number of huge pages using sysctl:
# sysctl -w vm.nr_hugepages=5
To make the change permanent, add the following line to the file /etc/sysctl.conf:
# echo "vm.nr_hugepages=5" >> /etc/sysctl.conf
This file is used during the boot process.
You must reboot to allocate the number of hugepages needed. This is because hugepages requires large areas of contiguous physical memory. Over time, physical memory may be mapped and allocated to pages. Therefore, the physical memory can become fragmented.
N