RHELTuningandOptimizationforOracleV11.pdf

(728 KB) Pobierz
Red Hat Enterprise
Linux 5.1
Red Hat Enterprise Linux
Oracle Tuning Guide
Tuning and optimizing performance tips and guidelines for Oracle®
9i and 10g databases on Red Hat Enterprise Linux 5, 4, 3 and 2.1
Red Hat Enterprise Linux Oracle Tuning Guide
Red Hat Enterprise Linux 5.1 Oracle 9i and 10g Tuning Guide
Tuning and optimizing performance tips and guidelines for
Oracle® 9i and 10g databases on Red Hat Enterprise Linux 5, 4, 3
and 2.1
Edition 1.4
Editor
Chris Curran
ccurran@redhat.com
Copyright
©
2007 by Red Hat, Inc.
Red Hat owns the copyright to this and all other subsequent derivative works. Werner Puschitz retains
the copyright to the original at
www.puschitz.com
1801 Varsity Drive
Raleigh, NC27606-2072USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
PO Box 13588Research Triangle Park, NC27709USA
Copyright
©
2007 by Red Hat, Inc. This material may be distributed only subject to the terms and
conditions set forth in the Open Publication License, V1.0 or later (the latest version is presently
available at
http://www.opencontent.org/openpub/).
Distribution of substantively modified versions of this document is prohibited without the explicit
permission of the copyright holder.
Distribution of the work or derivative of the work in any standard (paper) book form for commercial
purposes is prohibited unless prior permission is obtained from the copyright holder.
Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat, Inc. in the United
States and other countries. Linux is a registered trademark of Linus Torvalds.
All other trademarks referenced herein are the property of their respective owners.
The GPG fingerprint of the security@redhat.com key is:
CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E
This guide provides step by step instructions for tuning and optimizing Red Hat Enterprise Linux
on x86 and x86-64 platforms running Oracle®9i (32 bit or 64 bit) and Oracle®10g (32 bit or 64 bit)
standalone and RAC databases. It covers Red Hat Enterprise Linux Advanced Server 3 and 4 and the
older version 2.1.
I. Tuning and Optimizing Red Hat Enterprise Linux for Oracle Database 9i and 10g
1. Introduction
2. Hardware Architectures and Linux Kernels
2.1. General ...............................................................................................................
2.2. 32 bit Architecture and the hugemem Kernel ..........................................................
2.3. The 64 bit Architecture .........................................................................................
3. Kernel Upgrades
1
3
5
5
5
6
7
4. Kernel Boot Parameters
9
4.1. General ............................................................................................................... 9
4.2. The I/O Scheduler ................................................................................................ 9
5. Memory Usage and Page Cache
11
5.1. Checking the Memory Usage .............................................................................. 11
5.2. Tuning the Page Cache ...................................................................................... 11
6. Swap Space
13
6.1. General .............................................................................................................. 13
6.2. Checking Swap Space Size and Usage ............................................................... 14
7. Setting Shared Memory
7.1. Setting SHMMAX Parameter ..............................................................................
7.2. Setting SHMMNI Parameter ................................................................................
7.3. Setting SHMALL Parameter ................................................................................
7.4. Removing Shared Memory ..................................................................................
8. Setting Semaphores
8.1. The SEMMSL Parameter ....................................................................................
8.2. The SEMMNI Parameter .....................................................................................
8.3. The SEMMNS Parameter ...................................................................................
8.4. The SEMOPM Parameter ...................................................................................
8.5. Setting Semaphore Parameters ...........................................................................
8.6. An Example of Semaphore Settings ....................................................................
9. Setting File Handles
10. Adjusting Network Settings
10.1. Changing Network Adapter Settings ..................................................................
10.2. Changing Network Kernel Settings ....................................................................
10.3. Flow Control for e1000 Network Interface Cards .................................................
15
15
16
16
17
19
19
19
19
20
20
20
23
25
25
25
26
11. Setting Shell Limits for the Oracle User
27
11.1. Limiting Maximum Number of Open File Descriptors for the Oracle User ............... 27
11.2. Limiting Maximum Number of Processes Available for the Oracle User ................. 28
12. Enabling Asynchronous I/O and Direct I/O Support
12.1. Relinking Oracle9i R2 to Enable Asynchronous I/O Support .................................
12.2. Relinking Oracle 10g to Enable Asynchronous I/O Support ..................................
12.3. Enabling Asynchronous I/O in Oracle 9i and 10g ................................................
12.4. Tuning Asynchronous I/O for Oracle 9i and 10g ..................................................
12.5. Verifying Asynchronous I/O Usage .....................................................................
31
31
32
32
33
34
13. Configuring I/O for Raw Partitions
37
13.1. General ............................................................................................................ 37
13.2. Basics of Raw Devices ..................................................................................... 38
iii
Red Hat Enterprise Linux Oracle Tuning Guide
13.3. Using Raw Devices for Oracle Databases .......................................................... 39
13.4. Using Block Devices for Oracle 10g Release 2 in Red Hat Enterprise Linux 4
and 5 ....................................................................................................................... 40
14. Large Memory Optimization, Big Pages, and Huge Pages
14.1. Big Pages in Red Hat Enterprise Linux 2.1 and Huge Pages in Red Hat
Enterprise Linux 3 .....................................................................................................
14.2. Usage of Big Pages and Huge Pages in Oracle 9i and 10g .................................
14.3. Sizing Big Pages and Huge Pages ....................................................................
14.4. Checking Shared Memory Before Starting Oracle Databases ...............................
14.5. Configuring Big Pages in Red Hat Enterprise Linux 2.1 .......................................
14.6. Configuring Huge Pages in Red Hat Enterprise Linux 3 .......................................
14.7. Configuring Huge Pages in Red Hat Enterprise Linux 4 or 5 ................................
14.8. Huge Pages and Shared Memory File System in Red Hat Enterprise Linux 3 ........
41
41
42
42
42
42
43
45
46
15. Growing the Oracle SGA to 2.7 GB in x86 Red Hat Enterprise Linux 2.1 Without
VLM
49
15.1. General ............................................................................................................ 49
15.2. Linux Memory Layout ....................................................................................... 49
15.3. Increasing Space for the SGA in Red Hat Enterprise Linux 2.1 ............................ 50
15.4. Lowering the Mapped Base Address for Shared Libraries in Red Hat Enterprise
Linux 2.1 .................................................................................................................. 51
15.5. Lowering the SGA Attach Address for Shared Memory Segments in Oracle 9i....... 51
15.6. Allowing the Oracle User to Change the Mapped Base Address for Shared
Libraries .................................................................................................................... 52
16. Growing the Oracle SGA to 2.7/3.42 GB in x86 Red Hat Enterprise Linux 3, 4 and
5 Without VLM
16.1. General ............................................................................................................
16.2. Mapped Base Address for Shared Libraries in Red Hat Enterprise Linux 3, 4 and
5 ..............................................................................................................................
16.3. Oracle 10g SGA Sizes in Red Hat Enterprise Linux 3, 4 or 5 ...............................
16.4. Lowering the SGA Attach Address in Oracle 10g ................................................
55
55
55
56
57
17. Using Very Large Memory (VLM)
59
17.1. General ............................................................................................................ 59
17.2. Configuring Very Large Memory (VLM) .............................................................. 60
II. Installing the Oracle Database 10g on Red Hat Enterprise Linux
18. Downloading and Unpacking Oracle 10g Installation Files
19. Pre-Installation Preparation and Verification
19.1. Verifying Memory and Swap Space ...................................................................
19.2. Verifying Temporary(/tmp) Space ......................................................................
19.3. Verifying Software Packages (RPMs) .................................................................
19.4. Verifying Kernel Parameters ..............................................................................
20. Installing Required Software Packages
20.1. 10g R2 on Red Hat Enterprise Linux 4 and 5 x86-64 version ...............................
20.2. 10g R2 on Red Hat Enterprise Linux 4 and 5 (x86) .............................................
20.3. 10g R1 on Red Hat Enterprise Linux 4 and 5 (x86-64) ........................................
20.4. 10g R1 on Red Hat Enterprise Linux 4 and 5 (x86) .............................................
20.5. Oracle 10g R1 and R2 on Red Hat Enterprise Linux 3 (x86) ................................
20.6. Oracle 10g R1 on Red Hat Enterprise Linux 3 (x86_64) ......................................
63
65
67
67
67
67
71
75
75
77
78
78
79
79
iv
20.7. Oracle 10g R1 on Red Hat Enterprise Linux 2.1 (x86) ......................................... 80
20.8. Verifying and Updating the redhat-release File .................................................... 80
21. Sizing Disk Space for Oracle 10g
22. Setting Shell Limits for Your Oracle User
23. Creating Oracle User Accounts
83
85
87
24. Creating Oracle Directories
89
24.1. Optimal Flexible Architecture (OFA) for 10g R1 (10.1.0.2) .................................... 89
25. Setting Oracle Environments
91
26. Installing Oracle Database 10g
93
26.1. Installing Oracle 10g on a Remote Linux Server ................................................. 93
26.2. Installing Oracle 10gR2 Cluster Ready Services (CRS) with MPIO ....................... 93
26.3. Starting Oracle Universal Installer ...................................................................... 97
26.4. Using Oracle Universal Installer (OUI) ................................................................ 98
26.5. Updating after the Oracle Universal Installer ..................................................... 100
27. Oracle Post Installation Tasks
103
27.1. Startup and Shutdown of the Oracle 10g Database ........................................... 103
27.2. Shutdown of other Oracle 10g Background Processes ...................................... 103
28. Tips and Hints for Oracle 10g on Red Hat Enterprise Linux
29. Oracle 10g and Linux Installation Errors and Troubleshooting
III. Installing the Oracle9i 32 bit Database on Red Hat Enterprise Linux
30. Preparing Red Hat Enterprise Linux for an Oracle Database Installation
30.1. Unpacking and Downloading the Oracle9i Installation Files ................................
30.2. Setting Swap Space .......................................................................................
30.3. Setting Shared Memory ..................................................................................
30.4. Examining Temporary(/tmp) Space ..................................................................
30.5. Sizing Oracle Disk Space ................................................................................
31. Verifying Required Packages(RPMs)
31.1. Required Packages for Red Hat Advanced Server 2.1 .......................................
31.2. Required Packages for Red Hat Enterprise Linux 3 ...........................................
31.3. Required Packages for Red Hat Enterprise Linux 4 ...........................................
32. Setting Up a Working Environment for Oracle
32.1. Creating Oracle User Accounts .......................................................................
32.2. Creating Oracle Directories .............................................................................
32.3. Setting Oracle Environment Variables ..............................................................
33. Starting runInstaller
34. Installing Oracle9i R2 (9.2.0.1.0) on Red Hat Advanced Server 2.1
35. Installing Oracle9i R2 (9.2.0.4.0) on Red Hat Enterprise Linux 3
35.1. Installing Oracle9i R2 (9.2.0.1.0) on Red Hat Enterprise Linux 3 .........................
35.2. Patching Oracle9i to 9.2.0.4.0 on Red Hat Enterprise Linux 3 ............................
35.3. Patching Oracle Intelligent Agent on Red Hat Enterprise Linux 3 ........................
105
107
115
117
117
117
118
118
118
119
119
119
120
123
123
123
123
125
127
129
129
132
134
36. Installing Oracle9i R2 (9.2.0.6.0) on Red Hat Enterprise Linux 4
137
36.1. Installing Oracle9i R2 (9.2.0.4.0) on Red Hat Enterprise Linux 4 ......................... 137
v
Zgłoś jeśli naruszono regulamin