Oracle On AIX - Best Practices
Oracle On AIX - Best Practices
Agenda
1 Introduction
Agenda
1 Introduction
Introduction
Agenda
1 Introduction
§ Problem
• Wasting of disk resources (e.g. Redologs)
• Complex and difficult administration of scattered data files
§ Intelligent Disksubsystems
• Internal Read/Write Caches (0,5 - 64 GByte)
• Internal RAID-5 or RAID-10 (or similar) implementations
• SCSI or Fibre Channel-Attachment
Placement Policy § Use "Outside Edge" of disks § Use "Middle" for ESS arrays
to minimize seek
§ Number of Disksubsystems
• Should be based on throughput needs
• Should not be based on capacity needs (Terabytes)
§ OLTP Systems
• 200-300 GB Data per 2GBit Fibre Channel Port
• Large Cache Requirements
Agenda
1 Introduction
§ JFS access to data always uses the AIX Virtual Memory Manager
and the real memory as a buffer for files
• Improves performance when data is accessed multiple times
• Oracle data blocks are buffered twice and consume memory
Areas of Tuning
ç Asynchronous I/O
ç Read-Ahead
ç File Caching
ç Database Layout
File Caching
§ AIX is using up all memory until only "minfree" pages are left
• The percentage of memory that is used for file cache (numperm) can
be seen with the command
/usr/samples/kernel/vmtune (AIX 4.3 + 5.1)
/usr/bin/vmstat -v (AIX 5.2)
• minperm If numperm falls below this level, the page-replacement
algorithm steals both file and computational pages, regardless of
repage rates.
• maxperm If numperm rises above this level, the page-replacement
algorithm steals only file pages.
§ Tuning of the file cache will only improve performance if the system
was memory constrained before
§ Tuning is meant to avoid duplicate buffering of Oracle data blocks
which leads to a waste of physical memory
§ If the SAP R/3 database server has more than 2 GB memory and is
only used for SAP services
• minperm should be set equivalent to ~ 150 MB
• maxperm should be set equivalent to ~ 300 MB
• In case of 3 GB memory this corresponds to
/usr/samples/kernel/vmtune -p 5 -P 10
Tuning Read-Ahead
§ VMM tries to anticipate the future need for pages of a sequential file
by observing the pattern a program uses to access the file.
• minpgahead
The number of pages read ahead when the VMM first detects the
sequential access pattern. If the program continues to access the file
sequentially, the next read ahead will be doubled.
• maxpgahead
The maximum number of pages the VMM will read ahead in a
sequential file.
§ Journaled Filesystem
• maxpgahead = 256
Asynchronous I/O
§ Asynchronous I/O is an AIX operating system feature consisting of
• Request Queue for I/O write requests
• Kernel processes (aioservers) that take requests from the queue
§ Programs must use the corresponding application programming
interface in order to use asynchronous I/O
• no wait for the completion of a write request
• no blocking of application execution
§ Parameters for tuning asynchronous I/O
• minservers The minimum number of aioservers that are started for
asynchronous disk I/O. The default value is 1.
• maxservers The maximum number of aioservers that are started for
asynchronous disk I/O. The default value is 10. Since each aioserver
uses memory, this number should not be much larger than the
expected amount of simultaneous asynchronous disk I/O requests.
• maxreqs Maximum number of asynchronous disk I/O requests that
can be stored in the queue. The default value is 4096.
Agenda
1 Introduction
Concurrent I/O
§ AIX 5.2 ML01 provides JFS2 with the concurrent I/O feature
• Multiple threads can simultaneously perform read and write operations
on a shared file
• The option can either be used to open files or a whole filesystem can
be mounted with
mount -o cio
Benchmark results
§ New tuning commands with AIX 5.2 replace vmtune and schedtune
• vmo, ioo, schedo
§ Values are preserved after reboot, if pre AIX 5.2 compatibility mode
is switched off
• chdev -l sys0 -a pre520tune=disable
Agenda
1 Introduction
§ Oracle listeners
• Separate listeners should be configured for each instance with unique
port numbers
§ Transport Directory
• Each system environment should have a separate transport directory, e.g.
/usr/sap/trans<SID>
Workload Management
Summary
Questions ... ?
Agenda
1 Introduction
6 References
References