Linux - (Huge|Large) pages

About

Large page also known as “huge pages”.

Kernel Configuration

If large pages are supported by the kernel, there should be special files in the /proc directory that indicate the number and size of the large pages.

Since large pages must be allocated on a contiguous memory space, the actual large page size allocated may be smaller than requested. Also, the large page size itself is not configurable.

If PAM (Pluggable Authentication Modules) is enabled, you may need to modify the /etc/security/limits.conf file to increase the memlock limit. By default, the limit is 32 KB.

How to

get the number and size of the allocated large pages

meminfo

With proc/meminfo:

[oracle@Exalytics-01 ~]$ cat /proc/meminfo|grep Huge
HugePages_Total:   10000
HugePages_Free:     9248
HugePages_Rsvd:       17
HugePages_Surp:        0
Hugepagesize:       2048 kB

where:

  • HugePages_Total gives the total huge page
  • Hugepagesize indicates the system's fixed large page size.

The below output indicates that you have 10000 large pages, each of the size 2048 kb and then a total of 2 GB

sysctl.conf

With sysctl.conf, we can see the number of huge pages:

cat /etc/sysctl.conf|grep huge
#vm.nr_hugepages = 10000
vm.nr_hugepages = 205100

set the total number and size of the large pages

proc

On 2.6.x systems, the /proc/sys/vm/nr_hugepages file indicates the total number of large pages.

You can change the total number and size of the large pages by changing the contents of those files.

Example:

[oracle@Exalytics-01 ~]$ cat /proc/sys/vm/nr_hugepages
10000
[oracle@Exalytics-01 ~]$ echo 32 > /proc/sys/vm/nr_hugepages

sysctl.conf

You can configure and activate the number of large pages by setting the nr_hugepages parameter in the /etc/sysctl.conf file.

For example:

vm.nr_hugepages = 410200

Documentation / Reference





Discover More
Card Puncher Data Processing
Exalytics - Timesten Configuration

Timesten on Exalytics To set the resource limits for TimesTen: Make the following changes and additions to the /etc/security/limits.conf file: Make the following shared memory kernel settings in...
Timesten Component
Timesten - (Large|Huge) Pages Configuration

If a TimesTen database larger than 256GB is required, then you must configure Timesten in order to use large pages. Depending upon the Operating System you are using, you should look into enabling large...



Share this page:
Follow us:
Task Runner