Archive for the ‘oracle_init_parameters’ Category

Configuring Linux Hugepages for Oracle Database

April 21, 2011 Leave a comment

In this article we are going to discuss setting up hugapages on linux and using it for oracle instance.

*dbslcert*:/home/oracle/admin/diag/rdbms/oradv1/oradv1/trace=>grep Huge /proc/meminfo
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB

Each huge page size is 2MB and for 512MB sga we need 256 huge pages.

Add following entry in /etc/sysctl.conf and reboot the system.

I am adding only 160 pages and will test different scenarios by using init.ora file to start oracle instance.
vm.nr_hugepages = 160

cat /proc/meminfo
HugePages_Total: 160
HugePages_Free: 160
HugePages_Rsvd: 0
Hugepagesize: 2048 kB

Scenario 1:

Hugepages is not support with AMM


SQL> HOST date
Wed Apr 20 21:44:35 PDT 2011

SQL> startup force pfile=./initoradv1.ora
ORA-27125: unable to create shared memory segment
Linux-x86_64 Error: 2: No such file or directory


Wed Apr 20 21:40:44 2011
Starting ORACLE instance (normal)
Huge Pages are not compatible with specified SGA memory parameters
use_large_pages = “ONLY” cannot be used with memory_target,
memory_max_target, or use_indirect_data_buffers parameters
Huge Pages are compatible with sga_target and shared_pool_size

scenario 2:

AMM is disabled by setting memory_max_target = 0
Starting ORACLE instance (normal)
****************** Huge Pages Information *****************
Huge Pages memory pool detected (total: 160 free: 160)
Huge Pages allocation failed (free: 160 required: 257)
Startup will fail as use_large_pages is set to “ONLY”

use_large_pages is a must-set parameter if we need hugepages. With initialization parameters like use_large_pages, configuring hugepages for Oracle Database is very easy.

%d bloggers like this: