Oracle performance optimization under Windows 2000 requires consideration of disk I / O, CPU, network subsystem, memory several subsystems, focusing on the memory adjustment of Oracle in the Windows 2000 environment. Optimized Disk Configuration Oracle is a disk I / O strong application, to make sure you just configure disk and file system: First Run the Disk Defragmatler first run the disk defragmentation in order to safely organize disk fragments, you need to turn off the data file Example, and stop service. If you have enough continuous disk space to build a data file, you can easily avoid data files to generate debris. Do not use disk compressed Oracle data files that do not support disk compression. Do not use disk encrypted encryption icon disk compression to increase a process layer to reduce disk read and write speed. If you are worried that your data may be discussed, use the dbms_obfuscation package and Label Security to selectively encrypt the sensitive part of the data. Do not use more than 70% disk space remaining disk space storage system temporary data and the intermediate data is stored as a disk defragmentation. Use the RAID to select the hardware RAID to exceed the software RAID; with hardware RAID controllers; log files do not place on the RAID 5 volume, because RAID 5 reads performance high and poor write performance. Place the log file and archive log in a disk control system separated from the control file and data file. Separate page exchange files to multiple disk physical volumes across at least two disks to establish two page files. You can build four page files and benefit performance, make sure that all pages files are both twice the size of physical memory. Optimizing CPU Use and Configure Cancel Screen Sole Protection to Protect A large amount of CPU resources and provide useful use of the database server, especially the 3GL screen protection, if you must use the screen protection to reduce the CPU using the "empty screen" . Configure the system as the "System" of the application server to run the control panel, set "Performance Options" to "Background Programs" in the Advanced tab, which provides priority to the application, like Oracle, against the user in the graphical user interface Start a clumsy program. The hardware consumption of the hardware consumption in the monitoring system should be avoided. Usually such hardware is cheap because it loads the work to the CPU, and the CPU wants to handle the hardware of the peripheral advanced performance, it is often necessary to pay attention to: 1. Support bus control network card 2, support DMA without supporting disk controller for PIO Performance Monitor Tracking the% Interrupt Time Counter value of the processor object, and the baseline and standard of this counter, then monitor the problem. 3. Advantageously avoiding the interruption is to use the hardware RAID controller instead of the software RAID supported by Windows 2000. Maintaining the Minimal Security Audit Record runs Oracle Oracle on a private server is a large memory consumption, do not run Oracle Database on the system that performs the following functions: 1, main domain or backup domain controller (Windows 2000 Domain Domain Controller) 2 , File server 3, print server 4, remote access server 5, router, proxy, or firewall do not use fancy wallpapers (if used, try to minimize wallpaper file size
It is forbidden to prevent non-must-have services in your system. If you need some service functions, you can set the startup type to "Manual". To do this, you must first verify the actual service requirements with the network administrator: 1 If your system does not require a printer, stop this service and set to manual; 2. Stop License Logging Service service unless you have special requirements for it; You don't need the program; check the contents of the menu "Start / Program / Start" to delete unwanted programs. Optimizing network configuration network configuration is an important content of performance adjustment, and it is easy to hide performance bottlenecks. The fastest speed and effective mode for configuring the network card is for automatic detection, most default installations are NIC, if this is optional to adjust to "full duplex" and maximum line speed. Deleting unwanted web protocols only retain TCP / IP protocols. Optimizing the Network Protocol Binding Sequence Sets the main protocol on each NIC, typically TCP / IP, to the top of the protocol list. For Oracle prohibiting or optimizing file sharing ideals should prohibit file sharing features to minimize security leaks and network traffic, but if you need to use files and print sharing, then configure the "connection properties", setting "maximum of each network card in the system. Network application data throughput "memory tuning memory optimization is the key setting of the Windows platform, first understand the Oracle structure of the Windows 2000 platform: thread-based structure Windows2000 is based on thread-based structure. Instead, UNIX operating systems are based on process structure. This means that more applications in Windows, including Oracle, is performed in the form of a single process with multiple threads, which determines the advantage of Window2000 for the Window2000 - easier to share memory. The memory space is allocated for each process, and the inter-process shared memory is very awkward. To use additional encoding, thread is a subset of the process, and the memory is much more than the process. All threads of a particular process share the same process memory space, and the inter-thread sharing memory of the same process is fast, which gives a very advantage of thread-based structures and more efficient. Each application running on the server has one and there is only one process. The process is a carrier for the application, which is used to accommodate threads that actually work actually. From the user's point of view, the process can be seen without any specialized tool. The process of the process is the same as the container. It holds virtual storage space, data, system resources, and application settings. Although threads can be assigned, reassigned, and release memory, the process accepts the initial memory allocation and assigns it to all threads requested memory. The thread is a single execution path included in the process to share all processes resources. It also includes stack (stored in memory and other data), the status information of the CPU register (so threads can restore its environment), and a login in the execution list of the system scheduler. Each thread specifies some kind of work that is required to complete the task application. The main problem with Task Manager is to see any thread. Task Manager is designed to take the application as an overall application from the process layer. Of course, performance monitors can also be used to monitor Oracle memory under Windows. Select "Performance" to start "System Monitor" from the Start / Program / Manage Tool. Note that "Performance" includes two MMC plugins: "System Monitor" and "Performance Logs and Changes". At this time, some of the monitored counters (the counter is some performance indicators for statistics on the special objects of Windows 2000, such as the processor time required for specific threads). Click the Add button (like a plus sign in the figure), you will see the Add Counter dialog box. First, you need to select the "performance" object you want to monitor.
Select in the "Performance" drop-down list containing the "Process" object and "thread" object. Process Viewer is more easier to check one of the methods and processes. Some tools can be found in Windows 2000 Support Tools or Windows 2000 Resource Kit. Windows 2000 Support Tools is part of Windows 2000, but does not install automatically. Supported Windows Installer files in% CDROM% / support / Tools / directory. Just right click on 2000RKst.msj and select the installation from the Context menu.
Memory-based structure determines some memory restrictions because a single process consists of threads, and the address space of the process is limited, so few space is mobile. Because Windows 2000 is still 32 for the operating system, a single process address space is limited to 4GB, half of which is preserved by the operating system, which is also considered a system address space, which includes OS kernel encoding, hardware Abstract layer encoding (HAL) and different other structures that require management processes and OS interactions, this 2GB system address space is forbidden to access application processes. Therefore, Windows 2000 standard server single application process can use memory space a total of 2GB. In the Windows 2000 Advanced Server Startup file Boot.ini, there is / 3GB switch, change this ratio to 3GB, which is called 4GB tuning (4-gigabyte tuning, or 4GT), we will discuss this problem. The reserved memory is allocated to the thread and is reserved for future use, but there is no memory actually used. Because there is no actual use, it is still valid for other processes. However, because it has been assigned, it is still generated by the total memory restriction of the process of the thread, so the calculation of the memory is limited to 2GB or 3GB limit, and the sum of the memory reserved and the sum of memory used cannot exceed this limit. . In addition to physical memory installed in the system, Windows 2000 also uses virtual memory. This is actually a memory residing on the hard disk. But Windows 2000 makes it the same as the application is installed on the machine. When an application block requires access to that memory, Windows 2000 copies another memory block to disk, and puts the required memory in physical memory, and the size of these memory blocks is 4KB. That is, each time the application is proposed to the memory requirements, the memory is assigned in the 4kb page. The file that simulates memory on disk is called page scheduling file. Virtual Memory Manager (VMM Virtual Memory Manager) is a virtual memory component on the operating system management machine. All memory access is vmmm. This means that whenever the operating system needs to be stored, the VMM request is proposed. Memory tuning method: (1) Using more than 4GB of memory is added, there is a way to allocate memory over 32-bit address space for a single process or application, in order to achieve this, Windows 2000 uses physical address extensions (Physical Address Extensions, or PAE ), PAE is essentially added address space from 32 bits to 36, but must have Pentium Pro or updated processors to enjoy this advantage. Under Windows NT 4.0, Intel provides the PSE36 driver to enjoy all 36-bit address space advantages, but support in 36-bit address space in Windows 2000 Advanced Server has been built in the operating system, however, the application must use the address window extension ( Address Windowing Extensions, or AWE API writes, Oracle9i Release Number 1 (Release 1) does not support AWE, all Oracle 8i issuings (Releases 8.1.5-8.1.7) support AWE. Oracle implements support for AWE in the 9i issue number 2 (Release 2).
(2) AWE and Windows 2000 AWE allows you to use any additional more than 4GB of memory in the system, in order to reflect this advantage, you must have more than 4GB of memory, you must have a Pentium Pro or an updated processor, you must run Windows 2000 Advanced Server Or Windows 2000 Data Center servers do not require special drivers because Windows 2000 has already supported AWE. To take advantage of this advantage, you must use the / PAE switch in the boot.ini file when starting the Windows 2000 machine, you must ensure that the account running Oracle service has the Lock Pages in Memory permission. After adding the Lock Pages in Memory permissions to the account running an Oracle Services, restart the Oracleservice service.
(3) AWE and Oracle can be determined that all the issued number of Oracle8i and Oracle9i issuer 2 allow you to configure more than 4GB restricted memory space for the database block buffer, so you want to release the memory space for the user (low) The memory of 3GB boundary), PGA memory and different memory buffer pools that make up SGA. In the initialization parameter file in init.ora, set parameters USE_IDIRECT_DATA_BUFFERS = True, no this parameter, Oracle cannot address address space above 4GB. Next, set the buffer pool size that determines the total amount of memory, sets two parameters of DB_BLOCK_SIZE and DB_BLOCK_BUFFERS. In Oracle9i Issuance No. 2, the parameter db_block_buffers is replaced by the parameter db_cache_size, which changed the number of specified buffer blocks to the specified buffer byte, and also explained that in one database of Oracle9i issuer 2 supports multiple Database block size. Regardless of the way, if you set the parameter USE_IDirect_buffers = true, you will only define and use a single database block size and block buffer (just in the issued number before 9i), so if the default database block size It is 4K, 8K or others, but setting DB_2K_CACHE_SIZE is not allowed. Next, you need to set the appropriate AWE_WINDOW_MEMORY parameter value for Oracle_home in the registry, which is in HKEY_LOCAL_MACHINE / SOFTWARE / ORACLE / HOME0, this parameter specifies the number of bytes, and if not set, the default is 1 GB. The size of this parameter depends on how much buffer size you want to set and is treated as a regular memory from the 3GB process address. Take the buffer size as an example, set AWE_WINDOW_MEMORY to default 1GB, you want 1GB to be considered regular memory, and the remaining 5GB buffer from 4GB limit address space. You want more buffer pools to remain in the regular address space, because the buffer pool accessed more than 4GB is slower than the access virtual address space (although it is still faster than the disk I / O). (4) Solving the memory problem related to AWE, it is necessary to note that the block buffer above each 4GB limit needs to retain about 200 bytes of buffers in the regular address space. Therefore, in the above example, we are approximately 312,000. The buffer head points to the buffer of the extended address space, the buffer head accounts for approximately 80MB of regular memory space, and if the database block is small, then this quantity will be quite high, so it is necessary to ensure these buffer heads, AWE_WINDOW_MEMORY, and all Oracle The memory requirements of the .exe process, including encoding, SGA other components, PGA memory, and each user connecting stack suitable for general 3GB virtual address space for Oracle.exe processes. Confirm that you have enough physical memory processing DB_BLOCK_BUFFERS outside AWE_Window_Memory, define the buffer pool size of 6GB, 1GB from the regular address space in our example, and the remaining 5GB is valid for the system and process address space for the entire process from 4GB. Therefore, this example can only work on at least 9GB of memory, you should also keep some space for other processes, only one process can access additional memory at a certain moment. As mentioned earlier, the / PAE switch is only used in the system to have more than 4GB physical memory, but if the system memory is less than 4GB, it can also imitate this feature.