Sie sind auf Seite 1von 4

Page 1 of 4

Subject: HugePages on 64-bit Linux Doc ID: 361468.1 Modified Date: 02-FEB-2009 In this Document Purpose Scope HugePages on 64-bit Linux Introduction Very Large Memory 64-bit Systems Why HugePages Should Be Used on 64-bit Linux? HugePages and Oracle 11g Automatic Memory Management (AMM) Configuration/Setup References Type: REFERENCE Status: PUBLISHED

Applies to:
Oracle Server - Enterprise Edition - Version: 9.2.0.1 Linux Kernel - Version: 2.4 to 2.6 Linux Itanium Linux x86-64 IBM Power Based Linux

Purpose
This document aims to describe the use of HugePages feature in the Linux kernel on 64-bit hardware.

Scope
Information in this document is useful for Linux system administrators and Oracle database administrators working with system administrators. This document covers information about Linux HugePages for 64-bit architectures.

HugePages on 64-bit Linux


Introduction

https://metalink.oracle.com/CSP/main/article?cmd=show&type=NOT&id=361468.1

07/10/2009

Page 2 of 4

HugePages is a feature of the Linux kernel which allows larger pages to manage memory as the alternative to the small 4K pagesize. For a detailed introduction, see Note 361323.1. There is a general misconception where the HugePages is a feature specific to 32-bit Linux. This document focuses on uses of HugePages on 64-bit Linux platforms.

Very Large Memory 64-bit Systems


The major function of 64-bit architecture and O/S with 64-bit support is the ability to address Very Large Memory (VLM) natively. With 32-bit architectures, generally speaking, VLM is accessed through a VLM window (See Note 200266.1), which is a data structure in the process address space (virtually max 4GB) that provides access to whole virtual address space from a "window" of a specific size. On 32-bit Linux, we need to set the USE_INDIRECT_DATA_BUFFERS=TRUE and mount a shmfs/tmpfs/ramfs type of in-memory filesystem over /dev/shm. 64-bit Linux does not need these mechanisms and can use the physical memory directly as the address space is virtually 16 EB (exabyte = 2^60 bytes) at maximum. The 64-bit Linux platforms where Oracle RDBMS is supported as of March 2006 are: Linux Itanium (IA64) Linux x86-64 (AMD64 (Opteron) and EM64T) IBM Power Based Linux IBM zSeries Based Linux Note that not all of those platforms support HugePages and the HugePage size is different if supported (See Note 361323.1). To check whether HugePages are supported/available on a running configuration, run: $ grep Huge /proc/meminfo and check the output: HugePages_Total: HugePages_Free: Hugepagesize: Regardless of the values printed, if you can see the lines above, the system supports HugePages.

Why HugePages Should Be Used on 64-bit Linux?


Very Large Memory: The 64-bit systems do have VLM. So the general VLM issues apply. Not swappable: HugePages are not swappable. Therefore there is no page replacement mechanism overhead.HugePages are universally

https://metalink.oracle.com/CSP/main/article?cmd=show&type=NOT&id=361468.1

07/10/2009

Page 3 of 4

regarded as pinned. On Linux and some other platforms the Oracle Database initialization parameters PRE_PAGE_SGA and LOCK_SGA can be set to TRUE to pin the SGA pages into memory. HugePages already makes the SGA pages non-swappable, so those parameters are not needed to have SGA pages unswappable. But those parameters still can provide additional performance advantages for the internal mechanism of Oracle Database memory management.

Eliminated page table lookup overhead: Since the pages are not subject to replacement, page table lookups are not required. Faster overall memory performance: On virtual memory systems each memory operation is actually two abstract memory operations. Since there are less number of pages to work on, the possible bottleneck on page table access is clearly avoided. kswapd: kswapd will get very busy if there is a very large area to be paged (i.e. 13 million page table entries for 50GB memory) and will use an incredible amount of CPU resource. When HugePages are used, kswapd is not involved in managing them.

HugePages and Oracle 11g Automatic Memory Management (AMM)


The AMM and HugePages are not compatible. One needs to disable AMM on 11g to be able to use HugePages. See Note 749851.1 for further information.

Configuration/Setup
Implementing HugePages on 64-bit Linuxes and configuring them is not different from the configuration on 32-bit systems. See Note 361323.1 section "Parameters/Setup" for the generic setup of the feature. On 64-bit for best practice, set the memlock user limit to a value larger than the total size of the sga. e.g. For 5GB SGA: /etc/security/limits.conf: * * hard soft memlock memlock 5243000 5243000

References
Note 200266.1 - Increasing Usable Address Space for Oracle on 32-bit Linux Note 361323.1 - HugePages on Linux: What It Is... and What It Is Not...

https://metalink.oracle.com/CSP/main/article?cmd=show&type=NOT&id=361468.1

07/10/2009

Page 4 of 4

Keywords
LARGE~PAGE ; VLM ; USE_INDIRECT_DATA_BUFFERS ; HUGEPAGES ; PAGESIZE ; PERFORMANCE ; VM.NR_HUGEPAGES ; X86 ; Help us improve our service. Please email us your comments for this document. .

https://metalink.oracle.com/CSP/main/article?cmd=show&type=NOT&id=361468.1

07/10/2009

Das könnte Ihnen auch gefallen