Windows 64bit使用内存大页

Using Large Memory Pages on 64-Bit Windows Systems [ID 422844.1]  

  修改时间 30-JUN-2010     类型 BULLETIN     状态 PUBLISHED  

In this Document
  Purpose
  Scope and Application
  Using Large Memory Pages on 64-Bit Windows Systems
     How do I enable Large Page Support for my Oracle Instance?
     Verifying that Large Pages are Enabled for your Instance
     Facts About Large Pages on Windows:
      Large Page Size
     Known Issues
  References




Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.6 - Release: 10.1 to 11.1
Microsoft Windows Itanium (64-bit)
Microsoft Windows x64 (64-bit)
Microsoft Windows Server 2003 (64-bit Itanium)Microsoft Windows Server 2003 (64-bit AMD64 and Intel EM64T)Microsoft Windows (64-bit) on Intel Itanium

Purpose

The purpose of this bulletin is to explain Large Page usage for the Oracle RDBMS on 64-Bit Windows systems, and to provide instructions on how to implement this feature.

Scope and Application

This bulletin is intended for Oracle DBA's and Windows Systems Administrators on 64-Bit Windows machines running Oracle databases.   The purpose is to describe Oracle's implementation of Large pages on Windows, and explain how this can be configured.

Using Large Memory Pages on 64-Bit Windows Systems

What is Large Page support and why would I use it?

Large page support is a feature of Oracle Database 10g R1 and 10gR2.  It can provide a performance boost for memory-intensive database instances running on Windows Server 2003, by using larger memory pages than the OS default size of 4k. Specifically, when large page support is enabled, the CPUs in the system will be able to access the Oracle Database buffers in RAM more quickly, because instead of addressing the buffers in 4KB increments, the CPUs are told to use 2 MB page sizes or larger.  The default page size depends on the chipset, and the total amount of memory in the system.  This will be discussed later in this bulletin.

How do I enable Large Page Support for my Oracle Instance?

Large Page Support for an Oracle instance is enabled by setting a REG_SZ registry entry called ORA_LPENABLE, or ORA__LPENABLE to a value of 1 in the appropriate registry key for the Oracle installation.   Setting ORA_LPENABLE will enable Large Page support for ALL instances running out of that ORACLE_HOME.  This is generally not recommended, particularly if you are using ASM, because this setting would also enable Large Page support for the ASM instance.   Thus, it is recommended to use ORA__LPENABLE whenever this parameter is used.

To identify the appropriate key, first determine the ORACLE_HOME directory that your Oracle Instance is running from.   You can do this as follows:

1. Go to the services console by running services.msc
2. Identify the service for your instance.   In this example, we will use an instance name of TEST1, so we have a service called 'OracleServiceTEST1'
3.  Right-Click on the OracleServiceTEST1 service and choose 'Properties'.  On the 'General' tab there will be a line titled 'Path to Executable'.   This will be the path to the BIN directory of your ORACLE_HOME
4.  Next, using Windows Explorer, go to that ORACLE_HOME\bin directory and find a file called 'oracle.key'.   Open this file using a text editor such as Wordpad or Notepad.   
5.  This file will give you the registry key information for the key associated with that particular home.   The contents of the file will look something like this:

SOFTWARE\ORACLE\KEY_OraDb10g_home1

This key is actually under HKEY_LOCAL_MACHINE, so the full key path would be:

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_home1

6.  Open the registry via regedit and navigate to the key identified in Step#5 above.  With the key for the database home highlighted, go to the Regedit Menu and choose Edit->New->String Value
7.  Give the key a name of ORA_TEST1_LPENABLE   (In our example, we are using a SIDNAME of TEST1, but you will substitute your sidname as appropriate.
8.  After creating the new value, double-click on it and set it to a value of 1 to enable Large Page Support for that instance.
9.  You will need to stop the OracleServiceTEST1 service, and restart it, in order for the change to take affect.  If the instance is running, it should be shutdown cleanly (via SQLPLUS, for example) before the service is stopped.
10.  Note that if this is a RAC system, and you want instances on all nodes to use Large Pages, then you will have to add the value to the registry key on all nodes.  You can stop/restart the OracleServices in a rolling fashion, in order to avoid a full outage.

Verifying that Large Pages are Enabled for your Instance

You can get verification that Large Pages are enabled for your instance by checking the alert log.  At startup of the instance, you should see entries such as the following in your alert log, before the parameter listing:

Starting ORACLE instance (normal)
Thu Apr 12 15:56:55 2007  
Large page enabled : 1  
Thu Apr 12 15:56:55 2007  
Large page size : 16777216  
Large page request size : 16777216  
LICENSE_MAX_SESSION = 0  
LICENSE_SESSIONS_WARNING = 0
...........
...........

On NUMA architecture systems  (such as AMD x64 systems) you will see entries such as the following:

Starting ORACLE instance (normal)  
Wed Apr 11 17:06:24 2007  
Large page enabled : 1  
Wed Apr 11 17:06:24 2007  
Large page size : 33554432  
Large page request size : 33554432  
Wed Apr 11 17:06:24 2007  
Optimized NUMA large page alloction size : 33554432  
Wed Apr 11 17:07:28 2007  
Total Numa LP allocations : 000000019E000000  
Req. Numa LP allocations : 00000000C4000000  
Wed Apr 11 17:07:28 2007  
Numa LP Alloc on node: 0 alloc:0000000050000000 req:0000000050000000  
Wed Apr 11 17:07:28 2007  
Numa LP Alloc on node: 1 alloc:0000000050000000 req:0000000050000000  
Wed Apr 11 17:07:28 2007  
Numa LP Alloc on node: 2 alloc:0000000024000000 req:0000000024000000  
LICENSE_MAX_SESSION = 0  
LICENSE_SESSIONS_WARNING = 0
..........

Facts About Large Pages on Windows:

When using Large Pages on Windows, bear in mind the following: 

Large Pages are used only for the SGA -  so components of the SGA such as shared_pool, large_pool, java_pool  and db_cache_size, etc, will take advantage of large pages.   Other memory allocations for Oracle such as pga and uga memory, thread stacks, and process code for oracle.exe will not use large pages.

Large Pages are locked in memory by default by the operating system, meaning once the memory is allocated, it cannot be paged out.   Therefore, using parameters such as PRE_PAGE_SGA and LOCK_SGA are not necessary when using Large Pages.

Large Pages are not counted in the Working Set, so when monitoring Working Set, this value will be much lower than without large pages enabled.   In Windows Task Manager, the Mem Usage column is equivalent to the Working Set, so monitoring Mem Usage in Task Manager will also show memory usage much lower than what you would see otherwise.

Because Large Pages are locked in memory, if the OracleService is started by an account other than the LocalSystem account (default)  then the user account which is starting the service must have the 'Lock Pages in Memory'  privilege. To grant this privilege, go to:

Start ->  Administrative Tools -> Local Securiy Policy
Under Security Settings, Choose Local Policies -> User Rights Assignments.

In the Right-Hand pane, find the 'Lock Pages in Memory'  privilege, and grant that privilege to the account that the OracleService logs on as.

No kernel changes are required to be made to enable Large Pages.  Large page Support exists by default on Windows 2003 Server operating systems.

 Large Page Size

The default Large Page Size varies, depending on your platform.  
On 64-Bit x64 Windows, the default Large Page Size is 2MB.  
On 64-Bit Itanium, the default Large Page Size is 16MB. 

@ Setting ORA_LPSIZE or ORA__LPSIZE 
 

Known Issues

1.  If the system has been up and running for a long time, then startup may take a very long time, due to clean up of fragmented memory.     Refer to Note 862690.1 for more information on this.   In some cases, the startup may fail with the following errors if memory is too fragmented.  

SQL> startup  
ORA-27102: out of memory  
OSD-00022: additional error information  
O/S-Error: (OS 1450) Insufficient system resources exist to complete the requested service.  

If this occurs, then you may need to reboot the system in order to clean up the fragmented memory.

2.  In addition, the startup may fail with an ORA-600[SKGMINVALID] error, such as:

ORA-00600: internal error code, arguments: [SKGMINVALID], [6], [0], [275516362422484992], [], [], [], []

Again, this may be due to fragmentation of memory.   Changing to a larger page size may also help eliminate the above error.  In the above cases, setting the ORA_LPENABLE registry parameter to 0 to disable large pages will also allow the instance to start.

3.  On AMD Systems, you may need to disable Numa support in order to get the instance to start with Large Pages.   See Note 759565.1 for options/patches for NUMA.

You  may also do this by setting the following registry parameter as a REG_SZ, in the same key as the ORA_LPENABLE:
_ENABLE_NUMA   - set the value to FALSE.

Also, in the init.ora, set the following parameter:
_ENABLE_NUMA_OPTIMIZATION = FALSE

4.  If the service is running as a user, then it needs lock pages in memory privileges.  Failure to grant this privilege will result in the following error:

SQL> startup  
ORA-27102: out of memory  
OSD-00010: additional error information  
O/S-Error: (OS 1300) Not all privileges referenced are assigned to the caller.

To correct this, follow the steps listed earlier to grant the 'Lock Pages in Memory' privilege to the user, and then stop and restart the OracleService

5. With large pages, startup can sometimes be slow, as noted in Point#1 above.  This is due to high kernel CPU usage as the kernel is reclaiming pages to get contiguous large pages.  On RAC systems running Oracle Clusterware, in some cases this high CPU utilization in the kernel may prevent OCSSD or the Oracle Fence Driver from getting CPU time, thus causing Missed Check-ins with other nodes, or a perceived hang of the system.   In extreme cases, this can lead to a node eviciton.  This is more likely on systems with larger SGA's, that have been up and running for a long time, through multiple shutdowns/restarts of the database.   To avoid this, a clean boot of the system prior to restarting the database after the system has been up for an extended time will prevent the need to do much memory reclamation.  Again, Note 862690.1  has more information on this issue.


References

NOTE:862690.1  - Longer Database Startup times when large pages are enabled on 64-bit Windows 2003
NOTE:759565.1  - Oracle NUMA usage recommendation

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

转载于:http://blog.itpub.net/23135684/viewspace-676231/

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: gnuplot是一种流行的开源绘图工具,5.4.1是其最新版本,而Windows 64位则是指适用于Windows操作系统的64位版本。 gnuplot可以在Windows操作系统上运行,并且有专门针对64位系统的版本。通过下载并安装gnuplot 5.4.1的Windows 64位版本,您可以在64位的Windows系统上使用gnuplot进行数据可视化和绘图。 安装gnuplot的步骤相对简单。首先,您可以从gnuplot官方网站(https://gnuplot.info/)上下载适合于Windows 64位的安装程序。然后,运行该安装程序,并按照指导进行安装。 安装完成后,您可以通过启动gnuplot应用程序来使用它。gnuplot提供了一个命令行界面,您可以在其中输入绘图命令和参数。通过在命令行中输入相应的命令,您可以创建各种类型的图表,包括线图、散点图、柱状图等。您还可以设置图表的标题、坐标轴标签、图例等。 此外,gnuplot还支持导出图形为常见的图像文件格式,如PNG、JPEG和SVG。这使得您可以将绘制的图表保存为文件并在其他应用程序中使用。 总而言之,gnuplot 5.4.1的Windows 64位版本是一种强大的数据可视化工具,它可以帮助您在64位的Windows操作系统上绘制各种类型的图表,以便更好地理解和分析数据。 ### 回答2: gnuplot是一种强大的绘图工具,可以用于绘制各种类型的图表和图形。gnuplot 5.4.1是gnuplot的最新版本,适用于Windows 64位操作系统。 首先,为了使用gnuplot 5.4.1,您需要在gnuplot官方网站上下载适用于Windows 64位操作系统的安装包。安装包通常是一个可执行文件,您只需要双击它并按照安装向导的指示进行安装。 安装完成后,您可以通过启动gnuplot的可执行文件来打开gnuplot的命令行界面。在命令行界面中,您可以输入各种gnuplot命令来绘制图表和图形。 例如,您可以使用"plot"命令绘制二维图表。您只需要输入要绘制的数据和相关的选项即可开始绘图。另外,您还可以使用不同的颜色、线条风格和点风格来自定义图表的外观。 与此同时,gnuplot还支持绘制三维图表和图形。您可以使用"set view"命令设置视图角度,并使用"plot"命令绘制三维数据。您还可以使用其他命令来设置图表的外观,例如设置轴标签、图例和标题。 除了绘制图表,gnuplot还支持导出图形文件。您可以使用"set terminal"命令设置输出文件的格式(例如PNG或PDF),然后使用"set output"命令指定输出文件的名称。最后,使用"replot"命令来重新绘制图表并将其保存到输出文件中。 总体而言,gnuplot 5.4.1是一款功能强大的绘图工具,适用于Windows 64位操作系统。它提供了丰富的绘图和自定义选项,使用户能够轻松地创建各种类型的图表和图形。无论您是初学者还是专业人士,gnuplot都是一个值得尝试的工具。 ### 回答3: gnuplot是一个流行的开源数据可视化工具,用于生成高质量的科学图表。gnuplot 5.4.1是gnuplot软件的一个版本,适用于Windows 64位操作系统。 使用gnuplot 5.4.1可以绘制各种类型的图表,包括线图、散点图、柱状图、饼图、等值线图和3D图等。它支持多种数据文件格式,例如文本文件、CSV文件和二进制文件。用户可以通过简单的命令和脚本语言创建和定制图表。 gnuplot 5.4.1提供了丰富的图表定制选项,包括图表标题、坐标轴标签、图例、颜色、线型和点型等。用户可以调整图表的大小、比例和分辨率,以适应不同的需求。此外,gnuplot还支持数学函数的绘制,可以用于生成复杂的曲线和曲面。 为了在Windows 64位操作系统上安装gnuplot 5.4.1,可以按照以下步骤进行操作: 1. 访问gnuplot官方网站(https://www.gnuplot.info/)并下载适用于Windows 64位的安装程序。 2. 运行下载的安装程序,并按照提示进行安装。可以选择自定义安装选项,以便根据需要选择所需的组件和功能。 3. 完成安装后,可以在开始菜单或桌面上找到gnuplot的快捷方式。单击它打开gnuplot交互式终端。 4. 在gnuplot终端中,可以输入各种绘图命令和参数,以生成所需的图表。可以使用帮助命令来了解gnuplot的各种功能和用法。 总之,gnuplot 5.4.1是一个功能强大且易于使用的数据可视化工具,特别适用于科学研究和数据分析领域。通过安装并使用gnuplot 5.4.1,用户可以轻松地创建各种图表,以便更好地理解和展示数据。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值