Title: Oracle Memory Configuration on Windows Server
1Oracle Memory Configuration on Windows Server
- Configuring Large Memory for Oracle on 32-bit and
64-bit Windows
2Objectives
- At the end of this module the student will
understand the following concepts - OS Memory Configuration
- 32-bit and 64-bit systems
- Boot.ini file
- /3GB, /PAE, and /NOPAE Switches
- Oracle Memory Configuration
- Awe enabled
- Performance Implications of 32-bit Oracle
- Advantages of 64-bit Oracle
332-bit Addressing
- 32-bit processors have address registers that are
32-bits wide (can address up to 4GB physical RAM) - Allows per process virtual address space of 4GB
range (0 to 4,294,967,295 bytes) - Each individual process gets its own virtual
address space that can be up to 4GB - This virtual address space is divided system
and user space
4User and System Virtual Address Space
54GT (4GB Tuning) with /3GB
- /3GB 4GB Tuning Feature reduces system space
to 1GB, allowing 3GB for user space - Add to boot.ini file and reboot to take effect
- For systems 4GB to 16GB only
632-bit Systems with PAE (36-bit)
- PAE- Physical Address Extension
- AKA Large Memory Support
- Allows 36-bit memory addressing
- Allows the IA32 processor to address up to 64GB
of physical RAM - Add /PAE switch in the boot.ini file and reboot
server - Adds translation layer to memory access
7Windows 2003 /NOPAE Special Case (32-bit)
- New for Windows 2003 is the /NOPAE switch
- Forces Windows 2003 NOT to use PAE algorithms for
memory access (there is overhead involved) - Should be used on systems with 4GB or less and
hot-add memory devices
8Boot.ini Examples (32-bit)
- To use /3GB or /PAE, add the switches to the
boot.ini file and reboot the server - Note
- Using both /3GB and /PAE together conserves the
most memory under 4 GB - Using both /3GB and /PAE will limit memory
addressability to 16 GB
932-bit Memory Size/Switch Chart
10Support for /3GB and /PAE 32-bit
- Windows 2000 Advanced Server
- Windows 2000 Datacenter Server
- Windows 2003 Enterprise Edition
- Windows 2003 Datacenter Edition
1132-bit Max Memory Support on x86 based computers
- Windows 2003 Enterprise 32GB max
- Windows 2003 Datacenter 64GB max
12AWE for 32-bit Oracle
- Address Windowing Extension
- AWE a set of APIs that allow programs to
address memory locations outside of their 4GB
virtual addressing range - Available through 32-bit addressing
- With AWE programs reserve memory as non-paged
(will not page out)
13Implementing AWE with 32-bit Oracle
- Set the /PAE boot.ini flag
- Set the USE_INDIRECT_BUFFERSTRUE parameter in
the Oracle initialization file. - Use the DB_BLOCK_BUFFERS parameter in the
initialization file instead of the DB_CACHE
parameter. - The AWE_WINDOW_SIZE registry parameter sets up a
swap area in low memory to map data buffers in
high memory - Default size is 1 GB.
14Performance Implications of 32-bit Memory
Management
- Memory split into two parts is not as efficient
as memory in one segment - Overhead is introduced
- 32-bit systems with 8 GB of RAM may not perform
much better than systems with 4 GB of RAM. - May need to add 12 GB of RAM to see a noticable
return for the investment.
15Performance Implications of 32-bit Memory
Management
- Memory above 4 GB can only be used for
DATA_BUFFER cache. - There is little room for the Shared Pool, Large
Pool, PGA, etc. - The AWE_WINDOW_SIZE parameter takes up 1 GB of
RAM - Leaves only 1 GB of RAM for all other memory
types (2 GB with /3GB) - The other memory types are required for
supporting memory connections. - As a result, Oracle on 32-bit systems is severely
restricted on the number of user connections
supported - 100s low thousands with Shared Servers
16Conserving Memory for User Connections
- AWE/PAE does not improve user connectivity for
32-bit Oracle - User connections must share a limited pool of
memory, 1-2 GB - The AWE_WINDOW_SIZE registry parameter can be
decreased from 1 GB to as low as 512 MB to
increase user memory - Tradeoff between upper memory accessibility and
user memory size
17Conserving Memory for User Connections
- Oracle initialization parameters can be used to
decrease per user memory usage - bitmap_merge_area_size
- create_bitmap_area_size
- hash_area_size
- open_cursors
- sort_area_size (sort_area_retained_size)
- The Orastack command can be used to decrease
memory use per thread - Default allocation is 1 MB
- Risky to decrease below 700KB any change must be
tested - Example usage
- orastack oracle.exe 700000
- orastack tnslsnr.exe 700000
- orastack svrmgrl.exe 700000
- orastack sqlplus.exe 700000
18Windows 2003 64-bit Systems
- 64-bit versions of Windows have implemented up to
16 terabytes of virtual address space - Dont use PAE or /3GB with 64-bit
- 64-bit programs use 16 terabyte tuning model (8TB
user / 8TB kernel) - Compare to 32-bit tuning mode (2GB user / 2GB
kernel) - No performance penalties for large memory
- Unlimited user connectivity
1964-bit Memory Support on Itanium based computers
- Windows 2003 Enterprise 64-bit 1TB max
- Windows 2003 Datacenter 64-bit 1TB max
2064-bit Memory Support on EM64T and Opteron based
computers
- Windows 2003 Standard 64-bit 64GB
- Windows 2003 Enterprise 64-bit 1TB max
- Windows 2003 Datacenter 64-bit 1 TB max
21Monitor Oracle Memory
- Oracle for Windows Performance Counters
- Oracle phyreads/gets shows Buffer Cache
performance - Should be below 10 - few physical reads as a
proportion of all reads otherwise, more memory
may be required
22Review
- What flag is set in the boot.ini file to use
memory above 16 GB? - Which two flags may be set in the boot.ini file
for memory between 4 GB and 16 GB? - What are the performance implications of 32-bit
memory management for Oracle? - What tool may be used to monitor Buffer Cache
efficiency?
23Summary
- The following topics were discussed in this
training module - OS Memory Configuration
- 32-bit and 64-bit systems
- Boot.ini file
- /3GB, /PAE, and /NOPAE Switches
- Oracle Memory Configuration with AWE
- Performance Implications of 32-bit Oracle
- Advantages of 64-bit Oracle