Category: OS

Configuring Hugepages

The following are the advantages of using HugePages:

  • Increased performance through increased TLB hits.
  • Pages are locked in memory and are never swapped out which guarantees that shared memory like SGA remains in RAM.
  • Contiguous pages are preallocated and cannot be used for anything else but for System V shared memory (for example, SGA)
  • Less bookkeeping work for the kernel for that part of virtual memory due to larger page sizes
HPG_SZ=`grep Hugepagesize /proc/meminfo | awk {'print $2'}`

SEG_BYTES=`ipcs -m | awk {'print $5'} | grep "[0-9][0-9]*"`

The >> ipcs -m : Show only shared memory

echo "$SEG_BYTES/($HPG_SZ*1024)" | bc -q

echo "$NUM_PG+$MIN_PG+1" | bc -q

Value of memlock (both soft and hard) in /etc/security/limits.conf
ie.
* soft memlock
* hard memlock

is HugePages allocation in KB based on calculation :
ie. HugePages * Hugepagesize * 1024

Value of vm.nr_hugepages

Reference :
http://docs.oracle.com/cd/E11882_01/server.112/e10839/appi_vlm.htm#UNXAR394
http://oracle-base.com/articles/linux/configuring-huge-pages-for-oracle-on-linux-64.php

 

Advertisements