oracle memory configuration for windows

Upload: boomerwolf

Post on 08-Apr-2018

254 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 Oracle Memory Configuration for Windows

    1/23

    Oracle MemoryOracle MemoryConfiguration onConfiguration onWindows ServerWindows ServerConfiguring Large MemoryConfiguring Large Memory

    for Oracle on 32-bit and 64-for Oracle on 32-bit and 64-bit Windowsbit Windows

  • 8/7/2019 Oracle Memory Configuration for Windows

    2/23

    ObjectivesObjectivesAt the end of this module the student willAt the end of this module the student willunderstand the following concepts:understand the following concepts:OS Memory ConfigurationOS Memory Configuration

    32-bit and 64-bit systems32-bit and 64-bit systems

    Boot.ini fileBoot.ini file/3GB, /PAE, and /NOPAE Switches/3GB, /PAE, and /NOPAE Switches

    Oracle Memory ConfigurationOracle Memory ConfigurationAwe enabledAwe enabled

    Performance Implications of 32-bit OraclePerformance Implications of 32-bit OracleAdvantages of 64-bit OracleAdvantages of 64-bit Oracle

  • 8/7/2019 Oracle Memory Configuration for Windows

    3/23

    32-bit Addressing32-bit Addressing32-bit processors have address registers32-bit processors have address registersthat are 32-bits wide (can address up tothat are 32-bits wide (can address up to4GB physical RAM)4GB physical RAM)Allows per process virtual address spaceAllows per process virtual address space

    of 4GB range (0 to 4,294,967,295 bytes)of 4GB range (0 to 4,294,967,295 bytes)Each individual process gets its ownEach individual process gets its ownvirtual address space that can be up tovirtual address space that can be up to4GB4GB

    This virtual address space is divided This virtual address space is divided system and user spacesystem and user space

  • 8/7/2019 Oracle Memory Configuration for Windows

    4/23

    User and System VirtualUser and System VirtualAddress SpaceAddress Space

  • 8/7/2019 Oracle Memory Configuration for Windows

    5/23

    un ng wun ng w3GB3GB

    /3GB = 4GB Tuning Feature reduces/3GB = 4GB Tuning Feature reducessystem space to 1GB, allowing 3GBsystem space to 1GB, allowing 3GBfor user spacefor user space

    Add to boot.ini file and reboot to takeAdd to boot.ini file and reboot to takeeffecteffectFor systems 4GB to 16GB onlyFor systems 4GB to 16GB only

  • 8/7/2019 Oracle Memory Configuration for Windows

    6/23

    32-bit Systems with PAE32-bit Systems with PAE(36-bit)(36-bit)

    PAE- Physical Address ExtensionPAE- Physical Address ExtensionAKA Large Memory SupportAKA Large Memory SupportAllows 36-bit memory addressingAllows 36-bit memory addressing

    Allows the IA32 processor to address upAllows the IA32 processor to address upto 64GB of physical RAMto 64GB of physical RAMAdd /PAE switch in the boot.ini file andAdd /PAE switch in the boot.ini file andreboot serverreboot serverAdds translation layer to memory accessAdds translation layer to memory access

  • 8/7/2019 Oracle Memory Configuration for Windows

    7/23

    Windows 2003 /NOPAEWindows 2003 /NOPAESpecial Case (32-bit)Special Case (32-bit)

    New for Windows 2003 is the /NOPAENew for Windows 2003 is the /NOPAEswitchswitchForces Windows 2003 NOT to use PAEForces Windows 2003 NOT to use PAEalgorithms for memory access (therealgorithms for memory access (thereis overhead involved)is overhead involved)Should be used on systems with 4GBShould be used on systems with 4GB

    or less and hot-add memory devicesor less and hot-add memory devices

  • 8/7/2019 Oracle Memory Configuration for Windows

    8/23

    Boot.ini Examples (32-bit)Boot.ini Examples (32-bit)

    To use /3GB or /PAE, add the switches toTo use /3GB or /PAE, add the switches tothe boot.ini file and reboot the serverthe boot.ini file and reboot the serverNote:Note:

    Using both /3GB and /PAE together conservesUsing both /3GB and /PAE together conservesthe most memory under 4 GBthe most memory under 4 GBUsing both /3GB and /PAE will limit memoryUsing both /3GB and /PAE will limit memoryaddressability to 16 GBaddressability to 16 GB

  • 8/7/2019 Oracle Memory Configuration for Windows

    9/23

    32-bit Memory Size/Switch32-bit Memory Size/SwitchChartChart

    MEMORY SIZE Boot.ini SWITCH

    < 4GB None (or /NOPAE)

    = 4GB /3GB (or /3GB /NOPAE)

    > 4GB & 16GB /PAE only

  • 8/7/2019 Oracle Memory Configuration for Windows

    10/23

    Support for /3GB and /PAESupport for /3GB and /PAE 32-bit 32-bit

    Windows 2000 Advanced ServerWindows 2000 Advanced ServerWindows 2000 Datacenter ServerWindows 2000 Datacenter Server

    Windows 2003 Enterprise EditionWindows 2003 Enterprise EditionWindows 2003 Datacenter EditionWindows 2003 Datacenter Edition

  • 8/7/2019 Oracle Memory Configuration for Windows

    11/23

    32-bit Max Memory32-bit Max MemorySupport on x86 basedSupport on x86 basedcomputerscomputersWindows 2003 Enterprise = 32GB maxWindows 2003 Enterprise = 32GB max

    Windows 2003 Datacenter = 64GB maxWindows 2003 Datacenter = 64GB max

  • 8/7/2019 Oracle Memory Configuration for Windows

    12/23

    AWE for 32-bit OracleAWE for 32-bit Oracle

    Address Windowing ExtensionAddress Windowing ExtensionAWE a set of APIs that allow programs toAWE a set of APIs that allow programs toaddress memory locations outside of theiraddress memory locations outside of their4GB virtual addressing range4GB virtual addressing rangeAvailable through 32-bit addressingAvailable through 32-bit addressingWith AWE programs reserve memory asWith AWE programs reserve memory asnon-paged (will not page out)non-paged (will not page out)

  • 8/7/2019 Oracle Memory Configuration for Windows

    13/23

    Implementing AWE withImplementing AWE with32-bit Oracle32-bit Oracle

    SetSet thethe /PAE boot.ini flag/PAE boot.ini flagSet the USE_INDIRECT_BUFFERS=TRUESet the USE_INDIRECT_BUFFERS=TRUEparameter in the Oracle initialization file.parameter in the Oracle initialization file.Use the DB_BLOCK_BUFFERS parameter in theUse the DB_BLOCK_BUFFERS parameter in the

    initialization file instead of the DB_CACHEinitialization file instead of the DB_CACHEparameter.parameter.The AWE_WINDOW_SIZE registry parameterThe AWE_WINDOW_SIZE registry parametersets up a swap area in low memory to mapsets up a swap area in low memory to mapdata buffers in high memorydata buffers in high memory

    Default size is 1 GB.Default size is 1 GB.

  • 8/7/2019 Oracle Memory Configuration for Windows

    14/23

    er ormance mp cat onser ormance mp ca onsof 32-bit Memoryof 32-bit Memory

    ManagementManagementMemory split into two parts is not asMemory split into two parts is not asefficient as memory in one segmentefficient as memory in one segment

    Overhead is introducedOverhead is introduced

    32-bit systems with 8 GB of RAM may32-bit systems with 8 GB of RAM maynot perform much better than systemsnot perform much better than systemswith 4 GB of RAM.with 4 GB of RAM.May need to add 12 GB of RAM to see aMay need to add 12 GB of RAM to see anoticable return for the investment.noticable return for the investment.

  • 8/7/2019 Oracle Memory Configuration for Windows

    15/23

    er ormance mp ca onser ormance mp ca onsof 32-bit Memoryof 32-bit Memory

    ManagementManagementMemory above 4 GB can only be used for DATA_BUFFERMemory above 4 GB can only be used for DATA_BUFFERcache.cache.

    There is little room for the Shared Pool, Large Pool, PGA, etc.There is little room for the Shared Pool, Large Pool, PGA, etc.The AWE_WINDOW_SIZE parameter takes up 1 GB of RAMThe AWE_WINDOW_SIZE parameter takes up 1 GB of RAMLeaves only 1 GB of RAM for all other memory types (2 GB with /3GB)Leaves only 1 GB of RAM for all other memory types (2 GB with /3GB)The other memory types are required for supporting memoryThe other memory types are required for supporting memoryconnections.connections.

    As a result, Oracle on 32-bit systems is severely restricted onAs a result, Oracle on 32-bit systems is severely restricted onthe number of user connections supportedthe number of user connections supported

    100s low thousands with Shared Servers100s low thousands with Shared Servers

  • 8/7/2019 Oracle Memory Configuration for Windows

    16/23

    Conserving Memory for UserConserving Memory for UserConnectionsConnections

    AWE/PAE does not improve userAWE/PAE does not improve userconnectivity for 32-bit Oracleconnectivity for 32-bit OracleUser connections must share aUser connections must share alimited pool of memory, 1-2 GBlimited pool of memory, 1-2 GBThe AWE_WINDOW_SIZE registryThe AWE_WINDOW_SIZE registryparameter can be decreased from 1parameter can be decreased from 1GB to as low as 512 MB to increaseGB to as low as 512 MB to increaseuser memoryuser memory

    Tradeoff between upper memoryTradeoff between upper memoryaccessibility and user memory sizeaccessibility and user memory size

  • 8/7/2019 Oracle Memory Configuration for Windows

    17/23

    Conserving Memory for UserConserving Memory for UserConnectionsConnections

    Oracle initialization parameters can be used to decreaseOracle initialization parameters can be used to decreaseper user memory usageper user memory usage

    bitmap_merge_area_sizebitmap_merge_area_sizecreate_bitmap_area_sizecreate_bitmap_area_sizehash_area_sizehash_area_sizeopen_cursorsopen_cursorssort_area_size (sort_area_retained_size)sort_area_size (sort_area_retained_size)

    The Orastack command can be used to decrease memoryThe Orastack command can be used to decrease memoryuse per threaduse per thread

    Default allocation is 1 MBDefault allocation is 1 MB

    Risky to decrease below 700KB; any change must be testedRisky to decrease below 700KB; any change must be testedExample usage:Example usage:

    orastack oracle.exe 700000orastack oracle.exe 700000orastack tnslsnr.exe 700000orastack tnslsnr.exe 700000orastack svrmgrl.exe 700000orastack svrmgrl.exe 700000orastack sqlplus.exe 700000orastack sqlplus.exe 700000

  • 8/7/2019 Oracle Memory Configuration for Windows

    18/23

    n ows -n ows -SystemsSystems

    64-bit versions of Windows have64-bit versions of Windows haveimplemented up to 16 terabytes of implemented up to 16 terabytes of virtual address spacevirtual address spaceDont use PAE or /3GB with 64-bitDont use PAE or /3GB with 64-bit64-bit programs use 16 terabyte64-bit programs use 16 terabytetuning model (8TB user / 8TB kernel)tuning model (8TB user / 8TB kernel)

    Compare to 32-bit tuning mode (2GBCompare to 32-bit tuning mode (2GBuser / 2GB kernel)user / 2GB kernel)No performance penalties for largeNo performance penalties for largememorymemoryUnlimited user connectivityUnlimited user connectivity

  • 8/7/2019 Oracle Memory Configuration for Windows

    19/23

    64-bit Memory Support on64-bit Memory Support on

    Itanium based computersItanium based computers

    Windows 2003 Enterprise 64-bit =Windows 2003 Enterprise 64-bit =1TB max1TB max

    Windows 2003 Datacenter 64-bit =Windows 2003 Datacenter 64-bit =1TB max1TB max

  • 8/7/2019 Oracle Memory Configuration for Windows

    20/23

    64-bit Memory Support on64-bit Memory Support on

    EM64T and Opteron basedEM64T and Opteron basedcomputerscomputers

    Windows 2003 Standard 64-bit = 64GBWindows 2003 Standard 64-bit = 64GB

    Windows 2003 Enterprise 64-bit = 1TB maxWindows 2003 Enterprise 64-bit = 1TB maxWindows 2003 Datacenter 64-bit = 1 TB maxWindows 2003 Datacenter 64-bit = 1 TB max

  • 8/7/2019 Oracle Memory Configuration for Windows

    21/23

    Monitor Oracle MemoryMonitor Oracle Memory

    Oracle for WindowsOracle for WindowsPerformance CountersPerformance CountersOracle %phyreads/getsOracle %phyreads/getsshows Buffer Cacheshows Buffer Cacheperformanceperformance

    Should be below 10% -Should be below 10% -few physical reads as afew physical reads as aproportion of all reads;proportion of all reads;otherwise, moreotherwise, morememory may bememory may berequiredrequired

  • 8/7/2019 Oracle Memory Configuration for Windows

    22/23

    ReviewReview

    What flag is set in the boot.ini file to useWhat flag is set in the boot.ini file to usememory above 16 GB?memory above 16 GB?Which two flags may be set in theWhich two flags may be set in the

    boot.ini file for memory between 4 GBboot.ini file for memory between 4 GBand 16 GB?and 16 GB?What are the performance implicationsWhat are the performance implicationsof 32-bit memory management forof 32-bit memory management forOracle?Oracle?What tool may be used to monitorWhat tool may be used to monitorBuffer Cache efficiency?Buffer Cache efficiency?

  • 8/7/2019 Oracle Memory Configuration for Windows

    23/23

    SummarySummaryThe following topics were discussed in thisThe following topics were discussed in thistraining module:training module:OS Memory ConfigurationOS Memory Configuration

    32-bit and 64-bit systems32-bit and 64-bit systemsBoot.ini fileBoot.ini file/3GB, /PAE, and /NOPAE Switches/3GB, /PAE, and /NOPAE Switches

    Oracle Memory Configuration with AWEOracle Memory Configuration with AWEPerformance Implications of 32-bit OraclePerformance Implications of 32-bit Oracle

    Advantages of 64-bit OracleAdvantages of 64-bit Oracle