ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 设置32位的windows2003使用大内存 大于1.7

设置32位的windows2003使用大内存 大于1.7

原创 Linux操作系统 作者:zhangweizhao 时间:2011-04-12 16:11:36 0 删除 编辑
转自http://space.itpub.net/10834762/viewspace-445622

 

设置32位的windows2003使用大于1.7的内存

前两天出差遇到:32位的windows 2003使用大于1.7的内存的问题,PCserver上内存为16G,但由于32位的CPU的在windows系统中2G给系统用2G给应用程序使用,如系统及oracle参数不作修改时,oracleSGA内存使用不能超过1.7G,所以要对一些进行windos
ows
oracle参数据进行修改,大致有以下几步:

windows上的参数据修改:
   1.
修改boot.ini文件,加/3GB /PAE:
     
在这行,multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows" /3GB /PAE

   2.修改windows注册表:
     regedit
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0这个目录中找到AWE_WINDOW_MEMORY这个参数,将其修改为oracle需要内存的大小:例如:6G时为:6*1024*1024*1024
    
这个参数如不存大时,可以新建一个字符串名为AWE_WINDOW_MEMORY,值为上面讲过的大小,这个值需要足够大,不够时将报:
         ORA-27102 out of memory
         OSD-00034 Message 34 not found;  Product=RDBMS;facility =SOSD
         O/S Error: (OS 8) Not enough storage is available to process this command


   3.
修改windows控制面板中的管理工具--> 域安全策略-->本地安全策略-->用户权限分配-->锁定内存页(内存中锁定页面)中加入启oracle数据库OS用户名.


ORACLE数据库中要改的参数:
   1.
在改参数之前最好能先备份一个spfilepfile文件以防数据库修改失败时可以从这个参数文件在启动数据库: create pfile='d:\inittest.ora' from spfile;

   2.主要修改的参数为:
     _db_block_lru_latches --
这个参数据大小为=CPU*2*8
    
取消参数据:db_cache_size,sga_max_size  
     db_block_buffers
     USE_INDIRECT_DATA_BUFFERS=TRUE 
 

SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE
例程已经关闭。
SQL> startup
ORACLE
例程已经启动。

Total System Global Area 1008280152 bytes
Fixed Size                   455256 bytes
Variable Size             478150656 bytes
Database Buffers          528482304 bytes
Redo Buffers                1191936 bytes
数据库装载完毕。
数据库已经打开。
SQL> alter system set "_db_block_lru_latches"=32 scope=spfile;

系统已更改。

SQL> alter system reset db_cache_size scope=spfile sid='*';

系统已更改。

SQL> alter system set lock_sga=false scope=spfile;

系统已更改。

SQL> alter system set db_block_buffers=1179648 scope=spfile;

系统已更改。

SQL> alter system set use_indirect_data_buffers=true scope=spfile;

系统已更改。

SQL> create pfile='f:\init2.ora' from spfile;

文件已创建。

SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE
例程已经关闭。

可以通过OEM来修改PGA,shared pool这些内存大小


SQL> startup
ORACLE
例程已经启动。

Total System Global Area 7516192768 bytes
Fixed Size                   455256 bytes
Variable Size             478150656 bytes
Database Buffers          3528482304 bytes
Redo Buffers                1191936 bytes
数据库装载完毕。
数据库已经打开。


 

下为metalink为文章:

Subject:

Implementing Address Windowing Extensions (AWE) or VLM on Windows Platforms

 

Doc ID:

Note:225349.1

Type:

BULLETIN

 

Last Revision Date:

11-JUL-2007

Status:

PUBLISHED

PURPOSE
-------

To address the growing need for use of more memory on 32-Bit Windows platforms,
and explain how AWE is implemented by Oracle on Windows.

 
SCOPE & APPLICATION
-------------------
   Oracle DBA's running on the Microsoft Windows platform.
   Oracle Support Analysts, Field Engineers troubleshooting problems
   related to AWE and/or memory issues on Windows.

AWE Memory implementation on Windows 2000
------------------------------------------
 
   A common question on the Windows NT/Windows 2000 platform. revolves around
   how to take advantage of systems with more than 4 GB of RAM. As discussed
   in MetalinkNote 46001.1andNote 46053.1, the 32-Bit process address
   space for any process on Windows equates to a total of 4GB of addressable
   RAM. Of this, by default, 2GB is reserved for the process itself, and 2GB
   for the kernel. On systems running either Windows 2000 Advanced Server,
   or Windows NT 4.0 Enterprise Edition, this ratio can be changed by adding
   the /3GB switch to the boot.ini, allowing a process to address 3GB and
   reserving 1GB for the kernel. However, the total addressable memory for
   a single process is still only 4GB.
   See alsoNote 1036312.6: Utilizing Up to 3GB Virtual Memory on Windows NT Server 4.0


__________________________________________________________________

What can be done to address memory beyond 4GB?:
===============================================


   The answer is to take advantage of Physical Address Extensions (PAE), or
   Address Windowing Extensions (AWE)(These two terms are used interchangeably,
   so the rest of this document will refer to this simply as AWE).
   AWE support is available if you are running on a machine with more than 4GB  
   of physical RAM which is running any of the below Windows operating systems:

   * Windows 2000 Datacenter Server
   * Windows 2000 Advanced Server
   * Windows 2003 Data Center Edition (32-Bit)
   * Windows 2003 Enterprise Edition (32-Bit)

   On the above operating systems, AWE support is built into the OS. No
   special drivers are needed to take advantage of the additional memory.

 AWE CANNOT be used on the following Operating Systems:

   * Windows 2000 Server (Standard)
   * Windows 2000 Professional
   * Windows XP Home Edition
   * Windows XP Professional
   * Windows 2003 Standard Edition
   * Windows 2003Web
Edition

  NOTE Also that on 64-Bit Windows operating systems, there is no need for AWE
  implementation support, because the directly addressable memory for a single
  process on 64-Bit Windows is 8 Terabytes.

__________________________________________________________________

Oracle versions that can use AWE:
=================================

   Oracle can take advantage of AWE in the following 32-Bit RDBMS releases:

   * Oracle8.1.6.x
   * Oracle 8.1.7.x
   * Oracle 9.2.x
   * Oracle 10.1.x
   * Oracle 10.2.x

  Oracle does NOT implement AWE support in release 9.0.1.x


  AWE support is available on both the Enterprise Edition of Oracle and
  the Standard Edition of Oracle. However, on Standard Edition of 9.2.0.1,
  you may receive the following error if trying to start the database with
  USE_INDIRECT_DATA_BUFFERS=TRUE:

  ORA-439 - FEATURE NOT ENABLED: VERY LARGE MEMORY

  In Standard Edition 9.2.0.2 and 9.2.0.3, you will not receive the above errors,
  but VLM functionality is still not enabled. Refer to BUG#2945011 for more detail.
  This BUG is fixed in 9.2.0.3 Patch 2, and will be fixed in 9.2.0.4 as well.

__________________________________________________________________

Enabling support at the OS level:
==================================

   AWE can be enabled at the OS by adding the /PAE switch to the boot.ini
   as such:

multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced Server" /PAE

   It IS possible to have BOTH the /PAE and /3GB switch in place on the same
   machine, as such:

multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced Server" /3GB /PAE

   However, be aware that if BOTH switches are in place, the server will only
   be able to recognize up to 16GB of RAM. If you are working with a server
   with more than 16GB of RAM, you will need to choose between the two.

   It is important to note that once either or both of these switches are in
   place in the boot.ini, ALL processes running can take advantage of these
   switches. Thus, in a case where multiple Oracle instances are running on
   the same server, ALL instances can take advantage of the additional memory               
   afforded by these switches, up to the amount of physical memory on the box.


Operating System Privileges Needed at the OS Level:
====================================================

  In order to take advantage of the additional memory afforded through PAE,
  the operating system user account which is used to start the OracleService
  must be granted the 'Lock Pages in Memory' system privilege at the operating system
  level.  By default, the OracleService starts as the LocalSystem account.
  The LocalSystem account has the privilege to Lock Pages in Memory granted to
  it by default.

  However, if you change the OracleService to logon as a user OTHER than
  LocalSystem, you may see the following errors when attempting to start the
  database with USE_INDIRECT_DATA_BUFFERS set to TRUE :


  SQL> startup pfile=c:\temp\initscott.ora
  ORA-27102: out of memory
  OSD-00010: Message 10 not found; product=RDBMS; facility=SOSD
  
  O/S-Error: (OS 1300) Not all privileges referenced are assigned to the caller.


  To rectify this, you must grant the 'Lock pages in memory' privilege to the user
  that the OracleService starts as. To do this, click on:
  Start -> Programs -> Administrative Tools -> Local Security Policy
  (on a Domain Controller, click on 'Domain Security Policy' instead of 'Local Security Policy')
  Double-click on the 'Lock Pages in memory' policy.
  Add the appropriate user and click 'Ok'.
  Restart the OracleService


__________________________________________________________________

Understanding the Oracle implementation of AWE support:
=======================================================

   What the PAE switch allows you to do from the Oracle perspective is to
   increase the amount of memory that can be used for the Oracle Database
   Block Buffer Cache. It is important to note that this additional memory
   can ONLY be used by Oracle in the form. of an increased value for
   DB_BLOCK_BUFFERS. 

   There is still confusion on the old style. of VLM versus AWE on Windows 2000.
   With VLM on Windows NT 4.0, there was the concept of pointers pointing to
   the extended memory area, but that is no longer the case on Windows 2000.
   Instead, the windowing technology as described in these articles is being
   used. For more information on AWE/PAE implementation on the Windows
   platform, refer to Microsoft's website.

   As mentioned previously, with AWE enabled, this allows the process(es)
   (in this case ORACLE.EXE) to use memory above and beyond the 4GB
   mark defined by a 32-Bit Process Address space. The physical location of
   these blocks does not matter. However, the database blocks must still be
   accessed from within a ‘window’, which exists (logically) in that regular
   3GB process address space.
   The size of this window is defined by a registry setting in the HOME key for
   Oracle (HKLM\Software\Oracle\Homex) called AWE_WINDOW_MEMORY. By default,
   this value is 1GB, so if this value is not set in the registry, 
   AWE_WINDOW_MEMORY will be 1GB. 

   If you add the registry key yourself, the datatype should be a string value,
   or a REG_SZ.  The value for AWE_WINDOW_MEMORY must be specified in BYTES.

   It is important to realize that any database blocks accessed by Oracle
   (or any user/background thread within Oracle.exe) must first be mapped into
   the 'window' defined by AWE_WINDOW_MEMORY. In this scenario, it does not
   matter where the blocks are physically located - there is no need to be
   concerned with where the blocks are physically residing. The window will be
   drawn around the block (i.e. the block will be mapped) wherever it is located 
   in memory. If the block is in memory but has not been mapped into the
   ‘window’, then it may be necessary to unmapped another block that IS in the
   window, in order to accommodate the new block. While this mapping and
   unmapping of blocks does add some cost, it is still faster than incurring
   an I/O operation to read the block from disk. This will be discussed
   further down in the section on troubleshooting.
   
   Note:  

   Keep in mind that if there are multiple instances on a machine with
   the /PAE switch enabled, ALL instances can take advantage of the additional
   memory. However, AWE_WINDOW_MEMORY cannot be set on a per-instance basis,
   so all databases that are running out of the HOMEx key where
   AWE_WINDOW_MEMORY is set will inherit the same value.


__________________________________________________________________

Enabling AWE Support at the Database/Instance Level:
====================================================

   To enable the AWE implementation on Oracle, you must set the following
   parameter in the init file (or spfile) used to start the instance:

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23368118/viewspace-692324/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-11-22

  • 博文量
    9
  • 访问量
    145682