Chapter 14. Large Memory Optimization, Big Pages, and Huge Pages
42
• pages are locked in memory and are never swapped out which guarantees that shared memory
such as SGA remains in RAM.
• contiguous pages are pre-allocated and cannot be used for anything else but for System V shared
memory, for example SGA.
• less bookkeeping work for the kernel in that part of virtual memory due to larger page sizes.
14.2. Usage of Big Pages and Huge Pages in Oracle 9i and
10g
Big pages are supported implicitly in Red Hat Enterprise Linux 2.1. But Huge Pages in Red
Hat Enterprise Linux 3, 4 and 5 need to be requested explicitly by the application by using the
SHM_HUGETLB
flag when invoking the
shmget()
system call. This ensures that shared memory
segments are allocated out of the Huge Pages pool. This is done automatically in Oracle 10g and 9i
R2 (9.2.0.6) but earlier Oracle 9i R2 versions require a patch, see Metalink Note:262004.1.
14.3. Sizing Big Pages and Huge Pages
With the Big Pages and Huge Pages feature you specify how many physically contiguous large
memory pages should be allocated and pinned in RAM for shared memory like Oracle SGA. For
example, if you have three Oracle instances running on a single system with 2 GB SGA each, then at
least 6 GB of large pages should be allocated. This will ensure that all three SGAs use large pages
and remain in main physical memory. Furthermore, if you use ASM on the same system, then it is
prudent to add an additional 200MB. I have seen ASM instances creating between 70 MB and 150
MB shared memory segments. And there might be other non-Oracle processes that allocate shared
memory segments as well.
It is, however, not recommended to allocate too many Big or Huge Pages. These pre-allocated pages
can only be used for shared memory. This means that unused Big or Huge Pages will not be available
for other use than for shared memory allocations even if the system runs out of memory and starts
swapping. Also take note that Huge Pages are not used for the
ramfs
shared memory file system,
see
Section 14.8, “Huge Pages and Shared Memory File System in Red Hat Enterprise Linux 3”
, but
Big Pages can be used for the
shm
file system in Red Hat Enterprise Linux 2.1.
14.4. Checking Shared Memory Before Starting Oracle
Databases
It is very important to always check the shared memory segments before starting an instance. An
abandoned shared memory segment, from an instance crash for example, is not removed, it will
remain allocated in the Big Pages or Huge Pages pool. This could mean that new allocated shared
memory segments for the new instance SGA will not fit into the Big Pages or Huge Pages pool. For
more information on removing shared memory, see
Section 7.4, “Removing Shared Memory”
.
14.5. Configuring Big Pages in Red Hat Enterprise Linux 2.1
Before configuring Big Pages, ensure to have read
Section 14.3, “Sizing Big Pages and Huge Pages”
.
Note that Big Pages in x86 Red Hat Enterprise Linux 2.1 can only be allocated and pinned above
approximately 860MB of physical RAM which is known as
Highmem
or high memory region in x86.
Summary of Contents for CLUSTER SUITE FOR ENTERPRISE LINUX 5.1
Page 7: ...Part I Tuning and Optimizing Red Hat Enterprise Linux for Oracle Database 9i and 10g ...
Page 8: ......
Page 10: ...4 ...
Page 16: ...10 ...
Page 28: ...22 ...
Page 30: ...24 ...
Page 36: ...30 ...
Page 42: ...36 ...
Page 54: ...48 ...
Page 60: ...54 ...
Page 68: ...62 ...
Page 72: ...66 ...
Page 88: ...82 ...
Page 90: ...84 ...
Page 92: ...86 ...
Page 94: ...88 ...
Page 98: ...92 ...
Page 108: ...102 ...
Page 112: ...106 ...
Page 120: ...114 ...
Page 122: ......
Page 128: ...122 ...
Page 132: ...126 ...
Page 134: ...128 ...
Page 142: ...136 ...
Page 146: ...140 ...
Page 156: ...150 ...
Page 160: ...154 ...