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.1Microsoft 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_
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:
This key is actually under HKEY_LOCAL_MACHINE, so the full key path would be:
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:
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:
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
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
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_
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.
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:
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:
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 2003NOTE:759565.1 - Oracle NUMA usage recommendation
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-676231/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Windows記憶體管理-分頁Windows記憶體
- Oracle在Linux下對記憶體大頁HugePage的實踐OracleLinux記憶體
- MongoDB啟動Linux記憶體大頁(Huge Page)告警關閉MongoDBLinux記憶體
- C++獲取記憶體大小和使用率C++記憶體
- 如何獲取EMMC記憶體大小記憶體
- tomcat設定記憶體大小Tomcat記憶體
- 記憶體大小與效能的理解記憶體
- Windows10系統怎麼檢視電腦記憶體大小Windows記憶體
- 教你如何解決DPDK記憶體大頁在NUMA架構重分配問題記憶體架構
- CentOS限制實體記憶體大小方法CentOS記憶體
- Windows 8.1系統下如何檢視當前顯示卡的視訊記憶體大小Windows記憶體
- 電腦記憶體怎麼擴大 如何更改電腦記憶體大小記憶體
- 記憶體_大頁記憶體記憶體
- Windows下的weblogic部署web專案執行比較慢或記憶體溢位,需要調整記憶體大小WindowsWeb記憶體溢位
- Window7 32位系統破解電腦使用記憶體大小的限制記憶體
- struct結構體大小的計算(記憶體對齊)Struct結構體記憶體
- LINUX 檢視真正PGA佔用的記憶體大小Linux記憶體
- eclipse 設定java虛擬機器記憶體大小EclipseJava虛擬機記憶體
- tracemalloc庫追蹤程式碼申請的記憶體大小記憶體
- 【大頁記憶體】Oracle資料庫配置大頁記憶體記憶體Oracle資料庫
- 解決Apache長時間佔用記憶體大的問題,Apache 記憶體優化方法Apache記憶體優化
- Redis 檢視所有 key 的 value 值所佔記憶體大小Redis記憶體
- MIUI 9系統新屬性曝光:手機記憶體大瘦身UI記憶體
- windows10系統怎麼開啟記憶體鎖定頁Windows記憶體
- composer 報錯:超出記憶體大小的問題(Allowed memory size )記憶體
- ELK中 Elasticsearch和Logstash記憶體大小設定的考慮Elasticsearch記憶體
- 轉摘viadeazhu大牛_檢視oracle pga佔用記憶體大小Oracle記憶體
- 如何在Java中讀取超過記憶體大小的檔案Java記憶體
- Windows記憶體管理-分段Windows記憶體
- win10怎麼更改虛擬記憶體_win10更改虛擬記憶體大小方法Win10記憶體
- 使用RAMMap+PoolMon分析Windows記憶體異常使用問題Windows記憶體
- Windows中提高記憶體使用效率的絕技(轉)Windows記憶體
- 分享Windows/Mac電腦軟體大全WindowsMac
- element ui 分頁記憶checkedUI
- 11g ASM例項記憶體大小與diskgroup大小的關係ASM記憶體
- 【maxmem】利用Oracle的maxmem小工具得到系統可用記憶體大小Oracle記憶體
- windows 備用記憶體清理Windows記憶體
- windows記憶體清理工具Windows記憶體