AIX Performance: Configuration & Tuning For Oracle: Vijay Adik ATS - Oracle Solutions Team
AIX Performance: Configuration & Tuning For Oracle: Vijay Adik ATS - Oracle Solutions Team
AIX Performance:
Configuration & Tuning for Oracle
Vijay Adik
[email protected]
ATS - Oracle Solutions Team
Legal information
The information in this presentation is provided by IBM on an "AS IS"
basis without any warranty, guarantee or assurance of any kind. IBM also
does not provide any warranty, guarantee or assurance that the
information in this paper is free from errors or omissions. Information is
believed to be accurate as of the date of publication. You should check
with the appropriate vendor to obtain current product information.
All other products or company names are used for identification purposes
only, and may be trademarks of their respective owners.
Agenda
AIX Configuration Best Practices for Oracle
– Memory
– I/O
– Network
– Miscellaneous
• End-User Response time is the elapsed time between when a user submits a request and receives a response.
• Application Response time is the elapsed required for one or more jobs to complete. Historically, these jobs have been called batch jobs.
• Throughput is the amount of work that can be accomplished per unit time. This metric is typically expressed in terms of transaction per minute.
Agenda
AIX Configuration Best Practices for Oracle
– Memory
– I/O
– Network
– Miscellaneous
0 Kernel Segment
28-bit offset – to access a
Page Space Disk Map specific location in the
segment
Kernel Heap Segment is divided into 4096 byte chunks called pages
228 = 256M
Each Segment can have a maximum of
65536 pages
.
.
. 256 Mbyte Segment
52-bit Segment Id + 28-bit offset = 80-bit Virtual Address
Virtual Memory
1 Trillion Terabytes or 1 Yotta byte
VMM Tuning
Suggested Combination
– maxperm%=maxclient%=<High Percentage>
– minperm% = <Low Percentage>
– strict_maxperm=0
– strict_maxclient=1
– lru_file_repage=0
– lru_poll_interval=10
The file cache will be allowed to grow; however, when the VMM needs
memory it will steal only file pages. Why? Because we’ve set
lru_file_repage=0.
What is <High Percentage>
– If possible, set so maxclient% is always greater than numclient% (vmstat –v)
• Why? Maxclient is a hard limit; therefore, lrud will not run
What is <Low Percentage>
– Set so that numperm (vmstat –v) is always greater than minperm%
• Why? If numperm drops below minperm then lru_file_repage is set to 1 and you
will steal computational pages
maxfree
– Set maxfree = minfree + (MAX(maxpgahead, j2_maxPageReadAhead) x #
logical CPUs)
Example:
For a 6-way LPAR with SMT enabled, maxpgahead=8 and
j2_maxPageReadAhead=8:
– minfree = 360 = 120 x 6 x 2 / 4
– maxfree = 1536 = 1440 + (max(8,8) x 6 x 2)
Where,
Max Read Ahead = max( maxpgahead, j2_maxPageReadAhead)
SGA Memory Summary for DB: test01 Instance: test01 Snaps: 1046 -1047
Agenda
AIX Configuration Best Practices for Oracle
– Memory
– I/O
– Network
– Miscellaneous
Device Driver (s) Queues exist for both adapters and disks
Disk Subsystem (optional) Adapter device drivers use DMA for IO
Disk subsystems have read and write cache
Disk
Disks have memory to store commands/data
Cache Write Cache - ack sent back to application
Asynchronous I/O
AIX parameters (smit aio)
minservers = 10 * # cpus
maxservers = (10 * # disks) / # cpus
maxreqs = a multiple of 4096 > 4 * #disks * queue_depth
“enable” at system restart
Typical settings: minservers=100, maxservers=200, maxreqs=16384
Oracle parameters (init.ora)
disk_asynch_io = TRUE
filesystemio_options = {ASYNCH | SETALL}
db_writer_processes = n (normally left at default, 1)
db_writer_io_slaves = n (don’t use – implements AIO simulation)
Monitor usage:
• Watch for Oracle alert log or trace file messages:
– Warning “lio_listo returned EAGAIN”
• AIX Monitoring
– “pstat –a | grep aios”
– Use “-A” and “-t” options for NMON
Note: FASTPATH, which uses async IO. AIO servers method uses the process based IO, whereas FASTPATH method uses
Kernel based (interrupt based) is much better. Make sure it is enabled by using the following command:
– lsattr -El aio0 and look for the value "fastpath", which should be enabled
AIX Filesystems
Journaled File System (JFS)
Better for lots of small file creates & deletes
– Buffer caching (default) provides Sequential Read-Ahead, cached writes, etc.
– Direct I/O (DIO) mount/open option no caching on reads
GPFS
Clustered filesystem – the IBM filesystem for RAC
– Non-cached, non-blocking I/Os (similiar to JFS2 CIO) for all Oracle files
GPFS and JFS2 with CIO offer similar performance as Raw Devices
http://www-
1.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP100319
LV Striping
– Oracle recommends stripe width of a multiple of
• Db_block_size * db_file_multiblock_read_count
• Usually around 1 MB
– Valid LV Strip sizes:
• AIX 5.2: 4k, 8k, 16k, 32k, 64k, 128k, 256k, 512k, 1 MB
• AIX 5.3: AIX 5.2 Stripe sizes + 2M, 4M, 16 MB, 32M, 64M, 128M
– Use AIX Logical Volume 0 offset (9i Release 2 or later)
• Use Scalable Volume Groups (VGs), or use “mklv –T O” with Big VGs
• Requires AIX APAR IY36656 and Oracle patch (bug 2620053)
PP Striping
– Use minimum Physical Partition (PP) size (mklv -t, -s parms)
• Spread AIX Logical Volume (LV) PPs across multiple hdisks in VG
(mklv –e x)
Agenda
AIX Configuration Best Practices for Oracle
– Memory
– I/O
– Network
– Miscellaneous
Examples:
no -a |grep udp_sendspace
no –o -p udp_sendspace=65536
netstat -s |grep "socket buffer overflows"
Agenda
AIX Configuration Best Practices for Oracle
– Memory
– I/O
– Network
– Miscellaneous
Miscellaneous parameters
Environment variables:
– AIXTHREAD_SCOPE=S
Memory
Oracle 9i or 10g
– SGA can be dynamically resized, but has an upper bound of SGA_MAX_SIZE.
• SGA_TARGET (10g)
• DB_CACHE_SIZE, SHARED_POOL_SIZE., etc.
Dynamic Micro-partitions
LPARs Pool of 6 CPUs Partitioning options
Whole
Processors – Micro-partitions: Up to 254*
– Dynamic LPARs: Up to 32*
i5/OS V5R3**
AIX 5L V5.3
AIX 5L V5.3
AIX 5L V5.2
AIX 5L V5.3
– Combination of both
Linux
Linux
Configured via the HMC
Number of logical processors
– Minimum/maximum
utilized capacity
Time
Processor
Capacity
Entitled Processor Capacity
Utilization
ceded capacity
minimum processor capacity
Utilized Capacity
Time
10
20
30
40
50
60
70
80
90
0
100
10:45 12:36
10:47 12:38
10:49 12:40
10:51 12:42
10:53 12:44
10:55 12:46
12:48
10:57
12:50
10:59
12:52
11:01
12:54
11:03
12:56
11:05
12:58
11:07
13:00
11:09 13:02
11:11 13:04
User%
11:13 13:06
11:17 13:10
Sys%
13:12
Sys%
11:19
13:14
11:21
CPU Total AIX52 3/9/2004
Wait%
13:16
11:23
Wait%
CPU Total AIX53 10/9/2004
13:18
11:25
13:20
11:27
13:22
With SMT:
11:29
13:24
Without SMT:
11:31
13:26
11:33 13:28
11:35 13:30
11:37 13:32
11:39 13:34
11:41 13:36
11:43 13:38
13:40
11:45
13:42
11:47
13:44
11:49
IBM Advanced Technical Support - Americas
0
5
0
5
10
15
20
25
10
15
20
25
30
35
40
45
10:45 12:34
10:47 12:36
10:49 12:38
12:40
10:51
12:42
10:53
12:44
10:55
12:46
10:57
12:48
10:59
12:50
11:01
12:52
11:03 12:54
11:05 12:56
11:07 12:58
11:09 13:00
11:11 13:02
11:13 13:04
13:06
11:15
13:08
11:17
RunQueue
RunQueue
13:10
11:19
13:12
11:21
13:14
11:23
Processes AIX52 3/9/2004
13:16
Swap-in
Swap-in
11:25
Simultaneous Multithreading (SMT) & Oracle
13:18
11:27 13:20
11:29 13:22
11:31 13:24
11:33 13:26
08/26/21
11:35 13:28
11:37 13:30
13:32
11:39
13:34
11:41
13:36
11:43
13:38
11:45
13:40
11:47
13:42
11:49
13:44
IBM Advanced Technical Support - Americas
Reference Material:
Oracle Techical Documentation
http://technet.oracle.com
Oracle Support
http://metalink.oracle.com (requires support license)
Check metalink note ID 282036.1
IBM Redbooks on Oracle
http://www.redbooks.ibm.com
Advanced Technical Support (Techdocs)
http://www.ibm.com/support/techdocs
http://w3.ibm.com/support/techdocs (IBM Internal)
GPFS Documentation
http://publib.boulder.ibm.com/clresctr/library/gpfs_faqs.html
AIX Documentation
http://www.ibm.com/servers/eserver/pseries/library/
Q&A
Trademarks
The following are trademarks of the International Business Machines Corporation in the United States and/or other countries. For a complete list of IBM Trademarks, see www.ibm.com/legal/copytrade.shtml: AS/400,
DBE, e-business logo, ESCO, eServer, FICON, IBM, IBM Logo, iSeries, MVS, OS/390, pSeries, RS/6000, S/30, VM/ESA, VSE/ESA, Websphere, xSeries, z/OS, zSeries, z/VM
Lotus, Notes, and Domino are trademarks or registered trademarks of Lotus Development Corporation
Java and all Java-related trademarks and logos are trademarks of Sun Microsystems, Inc., in the United States and other countries
LINUX is a registered trademark of Linux Torvalds
UNIX is a registered trademark of The Open Group in the United States and other countries.
Microsoft, Windows and Windows NT are registered trademarks of Microsoft Corporation.
SET and Secure Electronic Transaction are trademarks owned by SET Secure Electronic Transaction LLC.
Intel is a registered trademark of Intel Corporation
* All other products may be trademarks or registered trademarks of their respective companies.
NOTES:
Performance is in Internal Throughput Rate (ITR) ratio based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput that any user will experience will vary
depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that
an individual user will achieve throughput improvements equivalent to the performance ratios stated here.
IBM hardware products are manufactured from new parts, or new and serviceable used parts. Regardless, our warranty terms apply.
All customer examples cited or described in this presentation are presented as illustrations of the manner in which some customers have used IBM products and the results they may have achieved. Actual
environmental costs and performance characteristics will vary depending on individual customer configurations and conditions.
This publication was produced in the United States. IBM may not offer the products, services or features discussed in this document in other countries, and the information may be subject to change without notice.
Consult your local IBM business contact for information on the product or services available in your area.
All statements regarding IBM's future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only.
Information about non-IBM products is obtained from the manufacturers of those products or their published announcements. IBM has not tested those products and cannot confirm the performance, compatibility, or any
other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
Prices subject to change without notice. Contact your IBM representative or Business Partner for the most current pricing in your geography.
References in this document to IBM products or services do not imply that IBM intends to make them available in every country.
Any proposed use of claims in this presentation outside of the United States must be reviewed by local IBM country counsel prior to such use.
The information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.