Language and Page Formatting Options
14.5. Configuring Big Pages in Red Hat Enterprise Linux 2.1
Before configuring Big Pages, ensure to have read Section 14.3, “Sizing Big Pages and Huge Pages”.
Note that Big Pages in x86 Red Hat Enterprise Linux 2.1 can only be allocated and pinned above approximately 860MB of physical RAM which is known as
Highmemor high memory region in x86. Thus, Big Pages cannot be larger than
Highmem. The total amount of memory in the high region can be obtained by reading the memory statistic
$ grep "HighTotal" /proc/meminfo HighTotal: 9043840 kB $
The Big Pages feature can be enabled with the following command:
# echo "1" > /proc/sys/kernel/shm-use-bigpages
Alternatively, you can use
sysctl(8)to change it:
# sysctl -w kernel.shm-use-bigpages=1
To make the change permanent, add the following line to the file
/etc/sysctl.conf. This file is used during the boot process.
echo "kernel.shm-use-bigpages=1" >> /etc/sysctl.conf
kernel.shm-use-bigpagesto 2 enables the Big Pages feature for the shared memory file system (
kernel.shm-use-bigpagesto 0 disables the Big Pages feature. In Red Hat Enterprise Linux 2.1 the size of the Big Pages pool is configured by adding a parameter to the kernel boot command. For example, if you use GRUB and you want to set the Big Pages pool to 1000 MB, edit the
/etc/grub.conffile and add the "
bigpages" parameter as follows:
default=0 timeout=10 title Red Hat Linux Advanced Server (2.4.9-e.40enterprise) root (hd0,0) kernel /vmlinuz-2.4.9-e.40enterprise ro root=/dev/sda2 bigpages=1000MB initrd /initrd-2.4.9-e.40enterprise.img title Red Hat Linux Advanced Server (2.4.9-e.40smp) root (hd0,0) kernel /vmlinuz-2.4.9-e.40smp ro root=/dev/sda2 initrd /initrd-2.4.9-e.40smp.img
After this change the system must be rebooted:
# shutdown -r now
After a system reboot the 1000 MB Big Pages pool should show up under
grep BigPagesFree /proc/meminfo
Note that if
/proc/meminfois 0 KB, then
BigPagesFreewill always be 0 KB as well since Big Pages can only be allocated and pinned above approximately 860MB of physical RAM.