Professional Documents
Culture Documents
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.
Agenda
RAC Configuration
RAC Tuning
Archive
Program Global Area (PGA) ARC0 Logs
System Global Area (SGA)
D000
Database
Files
%comp %file
100
90
80
70
60
50
40
30
20
10
0
8:03
8:04
8:05
8:06
8:07
8:08
8:09
8:10
8:11
8:12
8:13
8:14
8:15
8:16
8:17
8:18
8:19
8:20
8:21
8:22
8:23
8:24
8:25
8:26
8:27
8:28
8:29
8:30
8:31
8:32
8:33
8:34
8:35
7 Oracle for AIX Workshop © 2006 IBM Corporation
IBM Oracle Solutions - Advanced Technical Support - Americas
MINPERM% =5%
LRU_FILE_REPAGE=0
LRU_POLL_INTERVAL=10ms
STRICT_MAXPERM=0 (default)
STRICT_MAXCLIENT=1 (default)
If free list has been depleted in a memory pool, LRUD will scan/reclaim
memory in that pool
maxfree
Set maxfree = minfree + (MAX(maxpgahead, j2_maxPageReadAhead) * #
logical CPUs)/ # mem pools
Example:
For a 6-way LPAR with SMT enabled, maxpgahead=8 and
j2_maxPageReadAhead=8:
minfree = 1440 = 120 x 6 x 2
maxfree = 1536 = 1440 + (max(8,8) x 6 x 2)
Paging space
With AIX demand paging, paging space does not have to be large
½ memory + 4GB
Memory
Oracle 9i or 10g
– SGA can be dynamically resized, but has an upper bound by the parameter
SGA_MAX_SIZE.
• SQL> alter system set db_cache_size=2048m scope=both;
• (
SGA_TARGET (10g)
• DB_CACHE_SIZE, SHARED_POOL_SIZE., etc.
SQLPLUS:
SQL> show sga
SQL> show parameters
Agenda
CPU Considerations
Use SMT with AIX 5.3/Power5 environments
Micropartitioning considerations
- Virtual cpus)<= physical processors in shared pool
- CAPPED
- Virtual CPUs should be the nearest integer >= capping limit
- UNCAPPED
- Virtual CPUS should be set to the max peak demand requirement
DLPAR considerations
Oracle 9i
– Oracle CPU count does not recognize change in # cpus
– AIX scheduler can still use the added CPUs
Oracle 10g
– Oracle CPU count recognizes change in # cpus
Agenda
Archive
Program Global Area (PGA) ARC0 Logs
System Global Area (SGA)
D000
Database
Files
Filesystems
– Single-instance:
– JFS, JFS2, Veritas VxFS
– Clustered:
– GPFS, Veritas CFS
Raw
Automatic Storage Management (ASM) – new in
10g
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 Strip 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)
23 © 2005 IBM Corporation © 2003 IBM Corporation
IBM Oracle Solutions - Advanced Technical Support - Americas
Mount options:
Buffer Caching (default)– stage data in fs buffer cache
Direct I/O (DIO)– no caching on reads
Concurrent I/O (CIO) – DIO + no write lock (JFS2 only)
Release Behind Read (RBR)– During sequential reads, memory pages released after
pages copied to internal buffers
Release Behind Write (RBW) – During sequential writes, memory pages released after
pages written to disk
Single-instance environments
Cached vs. non-Cached (Direct) I/O
File System caching tends to benefit heavily sequential workloads with low
write content. To enable caching for JFS/JFS2:
Use default filesystem mount options
Set Oracle filesystemio_options=ASYNCH
DIO tends to benefit heavily random access workloads and CIO tends to
benefit heavy update workloads. To disable JFS, JFS2 caching:
In 9i, set filesystemio_options=SETALL and use dio or cio
mount option
In 10g, set filesystemio_options=SETALL
When using DIO/CIO, fs buffer cache isn’t used. Consider the
following db changes:
Increase db_cache_size
Increase db_file_multiblock_read_count
Read Metalink Note #272520.1
25 Oracle for AIX Workshop © 2006 IBM Corporation
IBM Advanced Technical Support - Americas
Oracle Binaries
Do not use CIO or DIO
Monitor usage:
Watch alert.log for errors:
Warning “lio_listo returned EAGAIN”
Monitor from AIX
“pstat –a | grep aios”
Use “-A” option for NMON
Iostat –Aq (new in AIX 5.3)
ASM configurations
AIX parameters
– Async I/O needs to be enabled, but default values may be used
DB instance parameters
– disk_asynch_io=TRUE
– filesystemio_options=ASYNCH
– Increase Processes by 16
– Increase Large_Pool by 600k
– Increase Shared_Pool by [(1M per 100GB of usable space) + 2M]
Agenda
Set rfc1323=1
Miscellaneous parameters
/etc/security/limits
Set to “-1” for everything except core for Oracle user
Environment variables:
AIXTHREAD_SCOPE=S
NUM_SPAREVP=1 (AIX 5.1 only)
Agenda
RAC Configuration/Tuning
Shared
D is k
Other Notes:
ORACLE_HOME directories must be local unless using GPFS or SFRAC.
10g REQUIRES separate LUNs for Voting Disk and OCR partitions unless a clustered filesystem or HACMP is used
Use separate directories for CRS, ASM, ORACLE_HOME
Oracle 9i RAC:
HACMP - 5.3 recommended
Veritas SFRAC 4.0
Other:
PSSP 3.5 is required for use of SP switch and can replace HACMP as
clusterware
Public interface
At least one network interface for client traffic
May use virtual ethernet if sufficient bandwidth – watch for 10.2.0.1 bug
10g requires one virtual IP address for client traffic for each node
Validate that the application uses OCI calls and can take advantage of TAF
JDBC Thick does not support use of OCI
TAF Supports failure/reconnect of failed connections
Optional select statement failover
OR
Hardware load balancer/sprayer
Software load balancer
DNS CNAMES
Oracle9i: Oracle “Fault Tolerant IP” (FTP-IP) feature provides Interconnect Network Fault
Tolerance
Oracle10g: Etherchannel or 802.3ad Link Aggregation AIX options replace Oracle FTP-IP code
May also be used with 9i CLUSTER_INTERCONNECTS parameter
Oracle Oracle
FT-IP FT-IP
AIX/HACMP AIX/HACMP
en1
en2
en3
en0
en1
en2
en3
en0
• Fault Tolerant
Private • Primary/Backup
10.0.0.1 10.0.0.3
Switch1 • No Bandwidth
10.0.0.2 10.0.0.4
Switch2 Aggregation
Public
Network interface names must be the same on all nodes – eg, if en0 is
a cluster interconnect, it must be a cluster interconnect on all nodes.
Oracle Oracle
en1
en2
en3
en0
en4
en0
en4
• Fault Tolerant
Private • Load Balanced
Switch1 • Bandwidth
Aggregation
Switch2
Public
Examples:
no -a |grep udp_sendspace
no –o -p udp_sendspace=65536
netstat -s |grep "socket buffer overflows"
GPFS tunables
See metalink note 302806.1
Async I/O:
Oracle parameter filesystemio_options is ignored
Set Oracle parameter disk_asynch_io=TRUE
Worker1threads = GPFS asynch I/O
Prefetchthreads= exactly what the name says
Worker1threads +prefetchThreads<=550
Usually set prefetchthreads=default (64) and worker1threads=550-
prefetchthreads
Set aio maxrequests=(worker1threads/#cpus) + 10
Other settings:
GPFS block size is configurable; most will use 512KB-1MB
Pagepool – GPFS fs buffer cache, not used for RAC but may be for
binaries. Default=64M
mmchconfig pagepool=100M
MaxMBpS = maximum I/O that GPFS can submit per second.
Default=150MBpS, should be set to approximate capacity of I/O subsystem
Ipqmaxlen=512
No –r –o ipqmaxlen=512
Small number of known Oracle accounts > 1TB and/or involving more
than 6 nodes
Oracle Documentation
Oracle Reference Manuals:
http://otn.oracle.com/documentation/index.html
Oracle Whitepapers:
http://otn.oracle.com/products/database/clustering/RACWhitepapers.html
Oracle Metalink:
http://metalink.oracle.com
– 282036.1
GPFS Documentation
Clusters Library:
http://www.ibm.com/servers/eserver/clusters/library/
– GPFS for AIX Frequently Asked Questions
Oracle Metalink:
http://metalink.oracle.com
– 302806.1: IBM General Parallel File System (GPFS) and Oracle RAC on AIX
5L and IBM eServer pSeries
QUESTIONS
ANSWERS