Configuring Huge Pages in Red Hat Enterprise Linux 4 or 5
45
This command usually takes a while to finish.
14.7. Configuring Huge Pages in Red Hat Enterprise Linux
4 or 5
Before configuring Big Pages, ensure to have read
Section 14.3, “Sizing Big Pages and Huge Pages”
.
In Red Hat Enterprise Linux 4 or 5 the size of the Huge Pages pool is specified by the desired number
of Huge Pages. To calculate the number of Huge Pages you first need to know the Huge Page size. To
obtain the size of Huge Pages, execute the following command:
$ grep Hugepagesize /proc/meminfo
Hugepagesize: 2048 kB
$
The output shows that the size of a Huge Page on this system is 2MB. This means if a 1GB Huge
Pages pool should be allocated, then 512 Huge Pages need to be allocated. The number of Huge
Pages can be configured and activated by setting
nr_hugepages
in the proc file system. For
example, to allocate 512 Huge Pages, execute:
# echo 512 > /proc/sys/vm/nr_hugepages
Alternatively, you can use
sysctl(8)
to change it:
# sysctl -w vm.nr_hugepages=512
To make the change permanent, add the following line to the file
/etc/sysctl.conf
. This file is
used during the boot process. The Huge Pages pool is usually guaranteed if requested at boot time:
# echo "vm.nr_hugepages=512" >> /etc/sysctl.conf
If you allocate a large number of Huge Pages, the execution of the above commands can take a while.
To verify whether the kernel was able to allocate the requested number of Huge Pages, run:
$ grep HugePages_Total /proc/meminfo
HugePages_Total: 512
$
The output shows that 512 Huge Pages have been allocated. Since the size of Huge Pages is 2048
KB, a Huge Page pool of 1GB has been allocated and pinned in physical memory.
If
HugePages_Total
is lower than what was requested with
nr_hugepages
, then the system does
either not have enough memory or there are not enough physically contiguous free pages. In the latter
case the system needs to be rebooted which should give you a better chance of getting the memory.
To get the number of free Huge Pages on the system, execute:
$ grep HugePages_Free /proc/meminfo
Free system memory will automatically be decreased by the size of the Huge Pages pool allocation
regardless whether the pool is being used by an application like Oracle DB or not:
$ grep MemFree /proc/meminfo
Содержание CLUSTER SUITE FOR ENTERPRISE LINUX 5.1
Страница 7: ...Part I Tuning and Optimizing Red Hat Enterprise Linux for Oracle Database 9i and 10g ...
Страница 8: ......
Страница 10: ...4 ...
Страница 16: ...10 ...
Страница 28: ...22 ...
Страница 30: ...24 ...
Страница 36: ...30 ...
Страница 42: ...36 ...
Страница 54: ...48 ...
Страница 60: ...54 ...
Страница 68: ...62 ...
Страница 72: ...66 ...
Страница 88: ...82 ...
Страница 90: ...84 ...
Страница 92: ...86 ...
Страница 94: ...88 ...
Страница 98: ...92 ...
Страница 108: ...102 ...
Страница 112: ...106 ...
Страница 120: ...114 ...
Страница 122: ......
Страница 128: ...122 ...
Страница 132: ...126 ...
Страница 134: ...128 ...
Страница 142: ...136 ...
Страница 146: ...140 ...
Страница 156: ...150 ...
Страница 160: ...154 ...