Optimize Oracle9i performance in Windows 2000

Source: Internet
Author: User
Tags dedicated server
I. Optimized disk configuration

Oracle is a disk I/O-intensive application. Make sure that you configure the disk and file system properly:

1. Run disk fragmentation before creating data files on the diskProgram
To securely organize disk fragments, You need to disable the instance that opens the data file and stop the service. If you have enough continuous disk space to create data files, you can easily avoid data file fragments.

2. Do not use disk compression
Oracle data files do not support disk compression.

3. Do not use disk encryption
Encryption adds a processing layer like disk compression to reduce disk read/write speeds. If you are worried that your data may be leaked, use the dbms_obfuscation package and Label Security to selectively Encrypt sensitive data.

4. Do not use more than 70% disk space
The remaining disk space is used to store temporary system data and intermediate data as the disk fragment program.

5. Use raid
Select hardware raid to exceed the software raid; have hardware RAID Controller; do not place log files on RAID 5 volumes, because RAID 5 has high read performance and poor write performance.

6. Place log files and archived logs in the disk control system separated from control files and data files.
Detach Page Swap files to multiple Disk Physical volumes and create two page files across at least two disks. You can create four page files and benefit from the performance. Make sure that the total size of all page files is at least twice the physical memory size.

Ii. Optimize CPU usage and Configuration

1. Cancel Screen Protection
Screen Protection absorbs a large amount of CPU resources and provides meaningless use for database servers. In particular, 3gl screen protection must be disabled, if you must use screen protection, use "empty screen" to reduce CPU usage.

2. Configure the system as an application server
On the "System" tab of the running control panel, set "performance options" to "background programs", which provides priority to applications, such as services similar to Oracle, you are opposed to starting a clumsy program on the graphic user interface.

3. Monitoring System for interrupted hardware consumption
Hardware that consumes CPU interruptions and time should be avoided. Generally, this hardware is cheap because it loads work into the CPU, and the CPU needs to process peripheral hardware with advanced performance. Note:

1> NIC that supports Bus Control
2> disk controllers that support DMA instead of PIO
Use the performance monitor to track the % interrupt time counter value of the processor object 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.

4. Keep minimum security audit records
Run Oracle on a dedicated server
Oracle is a large memory consumer. Do not run Oracle databases on systems that execute the following functions:
1> master domain or backup Domain Controller (Domain Controller in Windows 2000)
2> File Server
3> Print Server
4> remote server access
5>, routers, proxies, or firewalls

5. Do not use Fancy wallpapers (if used, minimize the wallpaper file size)

6. Disable non-essential services

It is best to disable non-essential services in the system. If some service functions are required from time to time, you can set the Startup Type to "Manual". To do this, first verify the actual service requirements with the network administrator:
1> if your system does not need a printer, usually stop the service and set it to manual;
2> stop the License Logging Service unless you have special requirements for it;
3> do not use the DHCP service and disable it;
4> do not start programs you don't need automatically;

7. Check the content in "Start/Program/start" and delete unnecessary programs.

3. Optimizing Network Configuration

Network configuration is an important part of performance adjustment, and it is easy to hide performance bottlenecks.

1. Configure the fastest speed and effective mode for the NIC
For automatic detection, most of the default installations are Nic. If this is optional, try to adjust it to "Full Duplex" and maximize wire speed.

2. Delete unnecessary network protocols

Only the TCP/IP protocol is retained.

3. optimized the network protocol binding sequence.

Set the master protocol on each Nic, typically TCP/IP, to the top of the protocol list.

4. Disable or optimize file sharing for Oracle

Ideally, the file sharing function should be disabled to minimize security leaks and network traffic. However, if you need to use file and print sharing, configure the "connection attribute" of each network card in the system ", set "maximize network application data throughput"

Iv. Memory Optimization

Memory optimization is a key setting for the Windows platform. First, let's take a look at the Oracle structure of the Windows 2000 Platform:

Thread-based structure

Windows2000 is a thread-based structure. On the contrary, UNIX operating systems are process-based structures. This means that more applications in windows, including Oracle, are executed in the form of a single process with multiple threads, this thread-based structure indeed brings window2000 advantages-easier to share memory. Memory space is allocated to each process. The shared memory between processes is clumsy and requires additional encoding. The thread is a subset of the process and uses much less memory than the process. All threads of a specific process share the same process memory space. The shared memory between threads of the same process is faster than the shared memory of different processes. This gives a thread-based structure great advantage and is more effective.

Each application running on the server has one process. A process is the carrier of an application and used to hold the threads that actually execute the application. From the user's perspective, a process can be seen without any special tools. Processes act like containers on other application components. It holds virtual storage space, Data, system resources, and application settings. Although the thread can allocate, re-allocate, and release the memory, the process accepts the initial memory allocation and distributes it to all the threads in the request memory. A thread is a single execution path that contains all process resources shared within a process. It also contains the stack (variables and other data stored in the memory) and the status information of the CPU register (so the thread can restore its environment) and a logon entry in the execution list of the system scheduler. Each thread specifies a job that the task application needs to do.

The main problem with using Task Manager is that no threads are visible. Task Manager is designed to treat applications as a whole at the process layer. Of course, you can also use performance monitor to monitor Oracle memory usage in windows.

Start "system monitor" from "Start/Program/Management Tools" and select "performance ". Note: "performance" includes two MMC plug-ins: "system monitor" and "Performance Logs and changes ". In this case, you need some counters to be monitored (counters are some performance indicators used to count Special Objects in Windows 2000, such as the processor time required by a specific thread ). Click the Add button (which looks like a plus sign in the figure). The add counter dialog box is displayed. First, select the "performance" object to be monitored. Select from the "performance" drop-down list that contains the "process" object and "Thread" object.

Process viewer is one of the methods that are easier to check threads and processes. You can find some tools in Windows 2000 support tools or Windows 2000 Resource Kit. Windows 2000 support tools is part of Windows 2000, but is not automatically installed. The Windows installer file that supports installation is in the írom % supporttools directory. Right-click 2000rkst. MSJ and select "Install" from the context menu.

Memory

The thread-based structure does have some memory restrictions, because a single process is composed of threads, and the address space of the process is limited, so there is little space to maneuver. Because Windows 2000 is still 32 as the operating system, the address space of a single process is limited to 4 GB, half of which are reserved by the operating system, the 2 GB system memory retained by the OS is also considered as the system address space, which includes the OS Kernel encoding and hardware abstraction layer encoding (HAL) unlike other structures that require process management and OS interaction, the 2 GB system address space prohibits application process access. Therefore, a single application process on a Windows 2000 standard server can use 2 GB of memory space. Start the file boot on the Windows 2000 Advanced Server. there is a/3 GB switch in ini, and this ratio is changed to 3 GB. This technology is called 4 GB tuning (4-gigabyte tuning, or 4 Gt). We will discuss this in detail.

The reserved memory is the memory allocated to the thread and reserved for future use, but there is no actually used memory. Because it is not actually used, it is still valid for other processes. However, because it has been allocated, it is still generated by the total memory limit on processes with threads. Therefore, the reserved memory computing is limited to 2 GB or 3 GB, the total memory reserved and used by the process cannot exceed this limit.

In addition to the physical memory installed in the system, Windows 2000 also uses virtual memory. This is actually the memory that resides on the hard disk. However, Windows 2000 makes it the same for applications as installing the memory on the machine. When an application block requires access to that memory, Windows 2000 copies another memory block to the disk and places the required memory in the physical memory, the size of these memory blocks is 4 kb. That is to say, each time an application requests memory, the memory is allocated to a 4 kb page. A file simulating memory on a disk is called a page scheduling file. Virtual Memory Manager (vmm Virtual Memory Manager) is a virtual memory component used to manage machines in the operating system. All memory access is through vmm. This means that every time the operating system requires Memory Page adjustment, a vmm request is required.

Memory optimization method:

(1) memory exceeding 4 GB

In addition, there is a way to allow a single process or application to allocate more than 32-bit address space memory, to achieve this, Windows 2000 uses physical address extensions (physical address extensions, or PAE ), in essence, PAE increases the address space from 32-bit to 36-bit, but you must have a Pentium Pro or an updated processor to enjoy this advantage. In Windows NT 4.0, Intel provides the iis36 driver to enjoy the advantage of all 36-bit address space, but the support for 36-bit address space in Windows 2000 Advanced Server has been established in the operating system, however, the application must use the address window extension (or awe) API. Oracle9i Release Number 1 (Release 1) does not support awe, all Oracle 8i release numbers (releases 8.1.5-8.1.7) Support awe. Oracle implements awe support in 9i Release 2 (Release 2.

(2) awe and Windows 2000

Awe allows you to use any additional memory of more than 4 GB in the system. To reflect this advantage, you must have more than 4 GB of memory and must have a Pentium Pro or an updated processor, you must run Windows 2000 Advanced Server or Windows 2000 data center server without special drivers because Windows 2000 supports awe.

To take advantage of this, you must use the/PAE switch in the boot. ini file when Starting Windows 2000. Make sure that the account running the Oracle service has the Lock Pages In Memory permission. After you grant the Lock Pages In Memory permission to the account running Oracle services, restart the oracleservice.

(3) awe and Oracle

It can be determined that all Oracle8i release number versions and Oracle9i Release Number 2 only allow you to configure memory space that exceeds 4 GB for the database block buffer. Therefore, to connect to the user, release the memory of the standard process address space (memory below the 3 GB limit), PGA memory and different memory buffer pools that constitute the SGA.

In the initialization parameter file init. ora, set the parameter use_indirect_data_buffers = true. Without this parameter, Oracle cannot address an address space larger than 4 GB. Next we need to set the buffer pool size that determines the total memory usage, and set the db_block_size and db_block_buffers parameters.

In Oracle9i Release 2, The db_block_buffers parameter is replaced by the db_cache_size parameter, which changes the original number of specified buffer blocks to the specified number of buffer bytes. Similarly, it also explains that multiple database block sizes are supported in a database with Oracle9i Release number 2. Either way, if you set use_indirect_buffers = true, you can only define and use a single database block size and block buffer (as in the release number before 9i). Therefore, if the default database block size is 4 K, 8 K, or other, it is not allowed to set db_2k_cache_size.

Next, you need to set the appropriate awe_window_memory parameter value for ORACLE_HOME in the registry, that is, in HKEY_LOCAL_MACHINE softwareoraclehome0, this parameter specifies the number of bytes. If not set, the default value is 1 GB. The size of this parameter depends on the size of the buffer to be set and is considered as the regular memory from the 3 GB process address space. Taking the buffer size as 6 GB as an example, set awe_window_memory to the default value of 1 GB. You want 1 GB to be treated as the regular memory, and the remaining 5 GB of the buffer comes from the address space larger than 4 GB. You want more buffer pools to be retained in the regular address space as much as possible, because the buffer pool with more than 4 GB access is slower than the buffer pool with access to the virtual address space (although it is still faster than the disk I/O operations ).

(4) solving awe-related memory problems

The general 3 GB virtual address space of the worker process.

Make sure that you have enough physical memory to process db_block_buffers outside of awe_window_memory. In our example, we define that the buffer pool size is 6 GB and 1 GB is from the regular address space, the remaining 5 GB comes from the system and process address space valid for the entire process other than 4 GB. Therefore, this example can only work on machines with at least 9 GB of memory, you should also reserve some space for other processes. Only one process can access the additional memory at a certain time.

As mentioned above, the/PAE switch is only used when the system has more than 4 GB physical memory. However, if the system memory is less than 4 GB, it can also be imitated. Set the maxmem parameter value in the boot. ini file. In the example below, set it to 2 GB, which means that any memory larger than 2 GB will be reserved as awe memory.

Multi (0) disk (0) RDISK (0) Partition (1) winnt = "Microsoft Windows 2000 Advanced

Server "/fastdetect/PAE/maxmem: 2048

Use multiple processes attached to a database

Real Application Clusters (RAC) provide the ability to run multiple instances and access the same data. Normally, this is used for projects with two or more nodes, and one instance runs on each node. In any case, it supports two instances running on a node in Oracle9i to access the same database. This can overcome the memory limit of each process and provide some other benefits, such as application failure detection.

From: http://oracle.itpub.net/
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.