Break through Oracle for Win2K 2G memory restrictions
.... It is well known that at 32-bit operating systems such as Win2k, the operating system can manage 4GB (Power (2,32) = 4G), and Oracle has 2G restrictions. At present, most of the information systems can be equipped with 4G physical memory for database servers, but no matter how much physical memory you are configured, it is normal to use more than 2G memory (including SGA, PGA, etc.), Thereby, system resources are wasted. So, is there any way to use Oracle running over a Windows system to use more than 2G memory? Windows provides a technology called 4GT (4G tuning) that makes Oracle use more than 2G (no more than 3G) memory possible. In order to make the application use more memory, there is a technology of PSE36, which allows Oracle to use more than 3G memory. Here, only the 4GT feature allows Oracle to discuss more than 2G memory. One of the basic requirements of 4GT characteristics: .... Although 4GT characteristics can be used on systems that do not exceed 2G physical memory, Oracle does not recommend this approach because it will seriously reduce system performance. In my experience, if the system does not install 4G physical memory, it is best not to use this method to let Oracle use more memory. In addition, when you need your Oracle to use more than 2G memory, the database server is best not to run other services to reduce the system's pressure, let Oracle work better. .... In addition, according to the documentation of the MS, 4GT can only be used on the Advanced Server, the DataCenter version, the Server version and the Professional version cannot use 4GT characteristics (actually not necessary?) III 4GT allows the application to use More than 2G memory .... Under normal circumstances, the Windows system is allocated to memory: the space between memory addresses 0x00000000 to 0x7FFFFFF, handed over to the application, operating system kernel, and its support use memory address The space between 0x80000000 to 0xFFFFFFF. After using 4GT, the operating system compresses the memory address space used by the kernel and its support program to 0xC0000000 to 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, thus "let" get "1G space for the application. However, just "let" there is no room for this 1G or not enough, it also needs to specify which application to use this "more" 1G space, and how to allocate the share. The concrete parameter setting will be discussed later. For the convenience of discussion, we will refer to the 2G memory (ie, the memory between 0x00000000000000000000000000000000000000 to 0x7ffffffff), and the 1G memory (address is 0x800000 to 0xBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFfff) Between which is called indirect memory. Three Oracle uses more than 2G memory, no more than 3G memory, steps: 1 First, uninstall the instance, turn off the Oracle service. 2 Turn on the operating system 3G switch: .... Modify the Boot.ini file to add / 3g parameters in the Windows item.
The modified Boot.ini file should be similar to the following: [Boot loader] Timeout = 8Default = Multi (0) Disk (0) RDisk (0) Partition (1) / Winnt [Operating Systems] Multi (0) Disk (0) RDisk (0) Partition (1) / Winnt = "Microsoft Windows 2000 Advanced Server" / 3G / FastDetect Notes in the field where Win2k AdvServer is started, there is more / 3g parameters. The role of this parameter is to launch your own kernel and support programs to the memory address 0xc0000000 to 0xFffffFFF when the Windows is started to the application. 3 Modify Oralce's init.ora file ..1) Determine Oracle buffer and shared pool size, assuming as follows: ........ db_block_size = 4096 ........ db_block_buffers = 262144 # The buffer size is 1g (db_block_size * db_block_buffers = 1g) ........ share_pool_size = 314572800 # Using 300M shared pool ..2) Add the following items: ........ USE_IDirect_Data_buffers = true. ..... "Tell Oracle to use indirect memory (you can use Windows 1G memory as a data buffer) ........ pre_page_sga = true ........ # Oracle SGA is locked to memory, does not generate a page swap file (8i parameters may be lock_sga = true) ........ # For a system with 4G physical memory, this parameter is not necessary 4 Modify the registry, define Oracle's DBBuffer Use a regular memory size .... Add a binary value in the registry / oracle / home0, name is AWE_WINDOW_MEMORY, the unit is byte, the size is for you Oracle uses normal memory as the size of the cache (not 1G that Windows makes it out, but the memory address between 0x0000000000 to 0x7FFFFFFF). If set to 209715200, that is, 200m size, the Oracle's data buffer will occupy 200M's normal memory, the rest (1G - 200M = 824m) use indirect memory. 5 Restart the operating system and start the database. OK, your current Oracle can use 2G 824M memory. Four Supplements Discussion 1 Windows System "Let" out 1G indirect memory can only be used in data buffer .... In the 4GT characteristic test, indirect memory can only be used for data buffers without being used for sharing The pool is also impossible to assign the user as a PGA. Perhaps there have been other parameters to be defined, but there is no such place in the literature that I find, and where you can use it, and in our test, indirect memory can only be used for data buffers. . This conclusion is only an experience. 2 Definition of the AWE_WINDOW_MEMORY parameter size in the registry .... This parameter defines the size of the buffer pool to use ordinary memory, not too small. When the data block size is 4K, the buffer pool is 1G (i.e., the 262144 block is used to make a buffer pool) size, this parameter is defined as 100m, and the Oracle cannot be activated and is defined as 200M.