oracle|window| Performance | optimization
Oracle performance optimization Under Windows 2000 requires consideration of disk I/O, CPU, network subsystem, memory subsystems, which focuses on Oracle memory tuning in Windows 2000 environments. Optimizing Disk Configuration Oracle is a strong disk I/O application to ensure that you properly configure the disk and file system: First run Disk Defragmenter before creating data files on disk to securely defragment the disk, close the instance of the Open data file and stop the service. If you have enough contiguous disk space to create data files, it's easy to avoid data files from fragmentation. Do not use disk compression Oracle data files do not support disk compression. Do not use disk encryption encryption like disk compression adds a processing layer to reduce disk read and write speed. If you are concerned that your data may leak, use the Dbms_obfuscation package and the label security to selectively encrypt the sensitive part of the data. Do not use the remaining disk space over 70% of disk space to hold system temporary data and to store intermediate data as Disk Defragmenter. Use RAID to select hardware RAID over software RAID; with hardware RAID controller; Log files should not be placed on a RAID 5 volume because of the high performance of RAID 5 read and poor write performance. A disk control system that separates log files and archive logs from control files and data files. Separate paging files to multiple disk physical volumes to create two paging files across at least two disks. You can create four paging files and benefit from performance, ensuring that all paging files are at least twice times the size of physical memory. Optimizing CPU usage and Configuration Canceling screen Saver screen saver absorbs a large amount of CPU resources and provides a meaningless use of the database server, specifically to prohibit 3GL screen protection, if you have to use screen protection to reduce CPU usage with a "blank screen". Configuring the system to run the system in the Application server running Control Panel, setting performance options to "Daemon" in the Advanced tab, provides priority to the application, like Oracle-like services, against users starting a clumsy program in the graphical user interface. Hardware that consumes interrupted hardware in the monitoring system that consumes CPU interrupts and time should be avoided. Usually this kind of hardware is cheap because it loads the work into the CPU, and the CPU to deal with the peripheral advanced performance of the hardware, usually need to note: 1, support bus control of the network card 2, support DMA and do not support PIO disk controllers use Performance Monitor to track processor object%interrupt time Counter values, and the baseline and standard of this counter, and then monitor the problem. 3. A good way to avoid interruptions is to use a hardware RAID controller instead of the software RAID supported by Windows 2000. Maintain the mostSmall security audit records running Oracle Oracle on a dedicated server is a large memory consumer, do not run an Oracle database on a system that performs the following functions: 1, primary domain or backup domain controller (domain controller under Windows 2000) 2, File server 3, print server 4, Remote access server 5, router, agent, or firewall do not use fancy wallpaper (if used, try to reduce the size of the wallpaper file
It is best to prohibit services that are not required in the system, if you need some service functionality at times, you can set the startup type to Manual, and to do this first verify the actual service requirements with your network administrator: 1, if your system does not require a printer, usually stop this service and set it to manual; 2, Stop License Logging service unless you have special requirements for it; 3, should not use the DHCP service and prohibit it; 4, do not automatically start the program you do not need, check menu "Start/Program/startup" contents, delete unwanted programs. Optimizing Network Configuration Network configuration is an important aspect of performance tuning, and it is easy to hide performance bottlenecks. Configure the network card to use the fastest and most efficient mode for automatic detection, most default installations are NICs, and if this is optional, try to adjust to full duplex and maximize line speed. Deleting unwanted network protocols retains only the TCP/IP protocol. Optimizing Network Protocol binding order sets the master protocol on each network card, typically TCP/IP, to the top of the protocol list. Banning or optimizing file sharing for Oracle ideally prohibit file sharing to minimize security leaks and network traffic, but if you need to use file and print sharing, configure the connection properties for each network adapter in your system and set the "Maximize network Application Data throughput" memory tuning Memory optimization is a key setting for Windows platform, first of all, to understand the Oracle architecture of the Windows 2000 platform: The Windows2000 structure is a thread based structure, whereas the UNIX operating system is a process based architecture. This means that more applications in Windows, including Oracle, are executed in the form of a single process with multiple threads, and this thread-based architecture does give Window2000 an advantage-easier to share memory. Memory space is allocated for each process, and shared memory between processes is clumsy, and with additional encoding, the thread is a subset of the process and uses much less memory than the process. All threads of a particular process share the same process memory space, and shared memory between the threads of the same process is faster than the shared memory of different processes, which gives a great advantage to the thread-based structure and is more efficient. Each application running on the server has one and only one process. A process is the carrier of an application and is used to hold threads that perform the actual work of the application. From a user's perspective, a process is a component that can be seen without any specialized tools. Processes work with other application components just like containers. It holds virtual storage space, data, system resources, and application settings. Although the thread can allocate, reassign, and free memory, the process accepts the initial memory allocation and assigns it to all threads that request memory. A thread is a single execution path that contains all process resources that are shared within a process. It also contains stacks (Variables and other data stored in memory, state information for the CPU registers (so that the thread can recover its environment), and a login entry in the execution list of the system scheduler. Each thread prescribes some kind of work that needs to be done to complete the task application. The main problem with Task Manager is that no threads are visible. Task Manager is designed to treat applications as a whole from the process layer. Of course, you can also use Performance Monitor to monitor Oracle memory usage under Windows. Select performance from Start/program/Administrative Tools to start System Monitor. Note that performance includes two MMC Plug-ins: System Monitor and Performance logs and changes. At this point, you need some monitored counters (counters are performance indicators that are used to count Windows 2000 special objects, such as counting the processor time required by a specific thread). Click the Add button (which looks like a plus sign in the diagram) and you will see the Add Counters dialog box. You first need to select the performance object you want to monitor. Select in the Performance Drop-down list that contains the process object and the thread object. The process Viewer is one of the more easy ways to check threads and processes. You can find tools within Windows Support Tools or Windows Resource Kit. Windows Support Tools is part of Windows 2000, but is not installed automatically. Windows Installer files that support installation are under the%cdrom% upport\tools\ directory. Just right click on the 2000RKST.MSJ and choose Install from the context menu.
There are some memory limitations on the thread-based structure of memory, because a single process consists of threads, and the process's address space is limited, so very little 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 reserved by the operating system, and the 2GB OS-reserved system memory is also considered the system address space, including OS kernel encoding, Hardware Abstraction Layer Encoding (HAL) and different structures that need to manage processes and OS interactions, this 2GB system address space is forbidden for application processes to access. Therefore, the Windows 2000 Standard Server single application process can use a total of 2GB of memory space. There is a/3GB switch in the Windows 2000 Advanced Server startup file boot.ini that changes this to 3GB, which is called 4GB tuning (4-gigabyte tuning, or 4GT) and we will discuss this issue in detail. The reserved memory is memory that is allocated to the thread and is reserved for future use, but is not actually used. Because it is not actually used, it is still valid for other processes. However, because it is already assigned, it is still generated by the total memory limit on the process that owns the thread, so the calculation of reserved memory is limited to 2GB or 3GB, and the sum of the memory that the process retains and uses cannot exceed this limit. In addition to the physical memory installed in the system, Windows 2000 uses virtual memory. This is actually the memory that resides on the hard disk. But Windows 2000 makes it as much of an application as it is installed on a machine. When an application block requires access to that memory, Windows 2000 copies the additional memory blocks to disk and places the required memory in physical memory, which is 4KB. That is, each time the application asks for memory, the memory is allocated to the 4KB page. A file that simulates memory on disk is called a paging file. Virtual Memory Manager (VMM Virtual Memory manager) is an operating system management machine that is part of a dummy memory component. All memory accesses are through VMM. This means that the VMM request is made whenever the operating system needs to make a memory paging. Memory Tuning Method: (i) using more than 4GB of memory in addition, there is a way to allow for a single process or application to allocate more than 32-bit address space memory, in order to achieve this, Windows 2000 uses physical Address extensions (physical addressing extensions, or PAE), PAE essentially increases the address space from 32 bits to 36 bits, but it must have Pentium Pro or newer processors to enjoy this advantage. Under Windows NT 4.0, Intel provides PSE3The 6 driver enjoys the advantage of all 36-bit address space, but support for the 36-bit address space in Windows Advanced Server has been built into the operating system, but the application must use Address window extensions (addressing windowing Extensions, or AWE) API, oracle9i distribution number 1 (Release 1) does not support AWE, and all Oracle 8i release numbers (releases 8.1.5–8.1.7) support awe. Oracle supports AWE in 9i distribution number 2 (Release 2). (ii) AWE and Windows Add AWE allow you to use any additional 4GB of memory in the system, in order to embody this advantage, you must have more than 4GB of RAM, must have Pentium Pro or newer processor, must run Windows 2000 Advanced Server or Windows 2000 Data Center Server, no special drivers are required because Windows 2000 already supports AWE. To take advantage of this advantage, you must use the/PAE switch in the Boot.ini file when you start the Windows 2000 machine, and you must ensure that the account running the Oracle service has the lock Pages in memory permission. To restart the Oracleservice service after adding lock Pages in memory permissions to the account running Oracle Services.
(iii) AWE and Oracle can determine that oracle8i all release number versions and Oracle9i Release 2 allow you to configure more than 4GB of memory space for the database block buffers, so that the user can connect the memory that releases the standard process address space (memory below the 3GB limit), PGA memory and the different memory buffer pools that comprise the SGA. In the initialization parameter file Init.ora to set the parameter use_indirect_data_buffers=true, without this parameter, Oracle cannot address to more than 4GB of addressing space. Next, set the buffer pool size that determines the total memory usage, and set the Db_block_size and db_block_buffers two parameters. In Oracle9i Release 2, the parameter db_block_buffers is replaced by the parameter db_cache_size, which changes the number of buffer blocks originally specified to the specified buffer byte. Also explains the support for multiple database block sizes in a database in Oracle9i Release 2. Either way, if you set the parameter use_indirect_buffers=true, you will only be able to define and use a single database block size and block buffer (as in a 9i release number), so if the default database block size is 4k, 8k, or otherwise, set the Db_2k_ Cache_size is not allowed. Next, you need to set the appropriate awe_window_memory parameter values for Oracle_home in the registry, which means that, under hkey_local_machine\ SOFTWARE\ORACLE\HOME0, this parameter specifies the number of bytes, if not set , the default value is 1 GB. The size of this parameter depends on how much buffer size you want to set and treats as normal memory from the 3GB process address space. For example, with a buffer size of 6 GB, set Awe_window_memory to the default value of 1GB, you want 1GB to be considered regular memory, and the remaining 5GB buffers are from the address space above the 4GB limit. You want more buffer pools to remain in the regular address space as much as possible, because accessing more than 4GB of buffer pools is slower than accessing the virtual address space buffer pool (although still faster than disk I/O operations). (d) Resolving the memory problems associated with AWE it is necessary to note that the block buffers above each 4GB boundary need to retain approximately 200 bytes of buffer headers in the regular address space, so in the above example we have about 312,000 buffer headers pointing to a buffer extending the address space. The buffer header accounts for approximately 80MB of normal memory space, and if the database block is small, the number is fairly high, so you must ensure that these buffer headers, awe_window_memory, and all OThe memory requirements of the Racle.exe process, including encoding, SGA other components, PGA memory, and each user connection stack are suitable for the regular 3GB virtual address space of the Oracle.exe process. Verify that you have enough physical memory to handle more than Awe_window_memory db_block_buffers, in our example, define the buffer pool size to be 6GB,1GB from the regular address space, The remaining 5GB is an effective system and process address space for the entire process from outside 4GB, so this example can only work on machines with at least 9GB memory, and you should also reserve some space for other processes, and only one process can access additional memory at some point. As mentioned earlier, the/PAE switch is only used when the system has more than 4GB of physical memory, but it can also be emulated if the system has less than 4GB of memory. Set the value of the MAXMEM parameter in the Boot.ini file, as in the following example, set to 2GB, which means that any 2GB or more memory will remain as AWE memory. multi (0) disk (0) rdisk (0) partition (1) \winnt= "Microsoft Windows Watts Advanced Server"/fastdetect/pae/maxmem:2048 Use additional processes for a database a true application cluster (real applications Clusters,rac) provides the ability to run and access the same data with multiple instances. Typically, this is used for projects with two or more nodes, one instance running on each node. In any case, it supports two instances in oracle9i to run on one node to access the same database. This overcomes the memory limitations of each process and provides some other benefits, such as application failure detection.
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:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.