Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Oracle breaks Oracle for Win2K 2G memory limit
As we all know, in 32-bit operating systems such as Win2K, the operating system can manage the memory is 4GB (Power (2,32) =4g), Oracle used total memory has 2G limit. At present, most information systems can be equipped with 4G of physical memory for the database server or more, but no matter how much physical memory you configure for the system, it is not normally possible for Oracle to use more than 2G of memory (including SGA, PGA, etc.), resulting in waste of system resources. So is there any way to make Oracle running on a Windows system use more than 2G of RAM? Windows provides a technology called 4GT (4G tuning) that makes it possible for Oracle to use more than 2G (no more than 3G) of memory. In order for applications to use larger memory, there is also a PSE36 technology that allows Oracle to use more than 3G of memory. Here, we discuss only using the 4GT feature to allow Oracle to use more than 2G of memory.
A basic requirement for using 4GT features:
.... Although 4GT features can be used on systems that do not exceed 2G of physical memory, Oracle does not recommend this approach, as this can severely degrade system performance. In my experience, if the system does not have 4G of physical memory installed, it is best not to use this method to let Oracle use more memory. In addition, the database server would be better off running other services to reduce system pressure and make Oracle work better when it is necessary for your Oracle to use more than 2G of memory.
.... In addition, according to MS's documentation, 4GT can only be used for Advanced server, Datacenter version, Server Edition and Professional Edition can not use 4GT features (in fact, is not necessary?) )
Two why 4GT allows applications to use more than 2G of memory
.... Under normal circumstances, the Windows system allocates memory to the space between the memory address 0x00000000 to the 0x7fffffff, to the application, the operating system kernel and its support using the memory address 0x80000000 to Space between the 0xFFFFFFFF. After using 4GT, the operating system compresses the memory address space used by the kernel and its supporting programs between 0xc0000000 and 0xFFFFFFFF to "let" the application out of 1G space. However, just "let" out of this 1G space is not enough, you need to specify which application to use this "extra" 1G space, and how to allocate shares. The following will be discussed in conjunction with specific parameter settings. For ease of discussion, we will normally use 2G of memory (that is, the memory between the address 0x00000000 to 0x7fffffff) as normal memory, while the 1G memory that Windows "let" out (address 0x80000000 to Between 0xBFFFFFFF) is called indirect memory.
Three Oracle uses more than 2G of memory, no more than 3G memory specific setup steps:
1 You should first uninstall the instance and turn off the Oracle service.
2 Open Operating system 3G switch:
.... Modify the Boot.ini file to add/3g parameters to the startup Windows entry. The modified Boot.ini file should resemble the following:
Default=multi (0) disk (0) rdisk (0) partition (1)
multi (0) disk (0) rdisk (0) partition (1) = "Microsoft Windows Advanced Server"/3g/fastdetect
Notice that there is a/3g parameter in the column that starts Win2K advserver. The function of this parameter is to allow Windows to start, load its own kernel and support program to the memory address 0xc0000000 to 0xFFFFFFFF, to leave the application 3G space.
3 Modify the Oralce Init.ora file
.. 1 determine the buffer and shared pool size for Oracle, assuming the following definition:
... db_block_size = 4096
... db_block_buffers = 262144 # buffer size 1G
... share_pool_size = 314572800 # using 300M shared pool
.. 2) Add the following items:
... use_indirect_data_buffers = True
... # tell Oracle you can use indirect memory (that is, you can use the 1G memory that Windows lets out as a data buffer)
... Pre_page_sga = True
... # lock Oracle SGA into memory, do not generate paging file (8i parameter may be LOCK_SGA = true)
... # for a system with 4G of physical memory, this parameter may not be necessary.
4 Modify the registry to define Oracle's Dbbuffer use normal memory size
.... Add a binary value to the registry _local_machine with the name Awe_window_memory, the value in bytes, and the size you need to let Oracle use normal memory as the size of the cache (not Windows let out 1G, Instead, the memory size of the memory address between 0x00000000 and 0x7fffffff. If set to 209715200, or 200M, then Oracle's data buffer will occupy 200M of normal memory, while the remainder (1g-200m = 824M) uses indirect memory.
5 Restart the operating system and start the database. OK, your Oracle now can use 2G + 824M memory.
Four supplementary discussions
1 Windows System "let" out of 1G of indirect memory, only for data buffers
.... In the 4GT feature test, indirect memory was found to be used only for data buffers, not for shared pools, and not for users as PGA. There may be other parameters that can be defined, but none of the literature I've found speaks about where indirect memory can be used, and in our tests it was found that indirect memory can only be used for data buffers when modified as above. This conclusion only as an experience, not conclusive, please add amendments.
2 definition of the awe_window_memory parameter size in the registry
.... This parameter defines the size of the buffer pool using normal memory, not too small. In cases where the block size is 4K and the buffer pool is 1G (that is, 262,144 blocks are used as buffer pools), when this parameter is defined as 100M, Oracle does not start, and when defined as 200M, it starts normally. Based on my reading of the literature, the information about the size of each block in the data buffer will be stored in normal memory and cannot be stored in indirect memory. If this parameter is too small, causing the buffer block header information to be stored, you can cause the database startup to fail. So, is it a buffer of the same size, the larger the database block, the smaller the parameter can be defined so that it can occupy less normal memory? Pending verification.
.... In the specific application, how to define this parameter should take into account the maximum number of concurrent connections (in dedicated server mode), user-reused stack size, sorting area, shared pool, large pool, and other memory parameter settings, as much as possible to put the data buffer into the indirect memory, make full use of the system's resources.
3 Performance of indirect memory
.... According to Oracle's literature, the performance of indirect memory (I think mainly refers to speed and efficiency, right?) ) is not as direct memory, and it is never recommended to use 4GT features on systems that do not have 4G physical memory installed. I do not know how to compare the speed and efficiency of indirect memory and direct memory, so it is not tested.
.... A little summary, hope to be able to enlighten everybody. I would also like to ask you to correct.
Test environment for the above content:
IBM X360 +4g memory + RAID 5 array
Windows advaced Server SP3 + Oracle 8.1.6 Dedicated Servers mode
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.