Red Hat Enterprise Linux 5

Tuning and Optimizing Red Hat Enterprise Linux for Oracle 9i and 10g Databases

Performance tips and guidelines for Oracle® 9i and 10g databases on Red Hat Enterprise Linux 5, 4, 3 and 2.1

Edition 1.6

Red Hat Engineering Content Services

Edited by

Laura Bailey

Edited by

Chris Curran

Legal Notice

Copyright © 2007, 2008, 2012 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
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
All other trademarks are the property of their respective owners.


1801 Varsity Drive
RaleighNC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701

Abstract

This article is a step by step guide 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
4. Kernel Boot Parameters
4.1. General
4.2. The I/O Scheduler
5. Memory Usage and Page Cache
5.1. Checking the Memory Usage
5.2. Tuning the Page Cache
6. Swap Space
6.1. General
6.2. Checking Swap Space Size and Usage
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
11. Setting Shell Limits for the Oracle User
11.1. Limiting Maximum Number of Open File Descriptors for the Oracle User
11.2. Limiting Maximum Number of Processes Available for the Oracle User
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
13. Configuring I/O for Raw Partitions
13.1. General
13.2. Basics of Raw Devices
13.3. Using Raw Devices for Oracle Databases
13.4. Using Block Devices for Oracle 10g Release 2 in Red Hat Enterprise Linux 4 and 5
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
15. Growing the Oracle SGA to 2.7 GB in x86 Red Hat Enterprise Linux 2.1 Without VLM
15.1. General
15.2. Linux Memory Layout
15.3. Increasing Space for the SGA in Red Hat Enterprise Linux 2.1
15.4. Lowering the Mapped Base Address for Shared Libraries in Red Hat Enterprise Linux 2.1
15.5. Lowering the SGA Attach Address for Shared Memory Segments in Oracle 9i
15.6. Allowing the Oracle User to Change the Mapped Base Address for Shared Libraries
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
17. Using Very Large Memory (VLM)
17.1. General
17.2. Configuring Very Large Memory (VLM)
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)
20.7. Oracle 10g R1 on Red Hat Enterprise Linux 2.1 (x86)
20.8. Verifying and Updating the redhat-release File
21. Sizing Disk Space for Oracle 10g
22. Setting Shell Limits for Your Oracle User
23. Creating Oracle User Accounts
24. Creating Oracle Directories
24.1. Optimal Flexible Architecture (OFA) for 10g R1 (10.1.0.2)
25. Setting Oracle Environments
26. Installing Oracle Database 10g
26.1. Installing Oracle 10g on a Remote Linux Server
26.2. Installing Oracle 10gR2 Cluster Ready Services (CRS) with MPIO
26.3. Starting Oracle Universal Installer
26.4. Using Oracle Universal Installer (OUI)
26.5. Updating after the Oracle Universal Installer
27. Oracle Post Installation Tasks
27.1. Startup and Shutdown of the Oracle 10g Database
27.2. Shutdown of other Oracle 10g Background Processes
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
36. Installing Oracle9i R2 (9.2.0.6.0) on Red Hat Enterprise Linux 4
36.1. Installing Oracle9i R2 (9.2.0.4.0) on Red Hat Enterprise Linux 4
36.2. Patching Oracle9i R2 to 9.2.0.6.0 on Red Hat Enterprise Linux 4
37. Starting and Shutting down the Oracle9i Database
37.1. sqlplus
37.2. Using the Oracle binaries dbstart and dbstop
38. Oracle Installation Errors
39. Reference List
A. Revision History