Professional Documents
Culture Documents
November 2003
Agenda
1 Introduction 2 Design of Disk Layout for SAP/Oracle Databases 3 Performance Tuning for the Journaled Filesystem 4 AIX 5L and the Enhanced Journaled Filesystem (JFS2) 5 Multiple SAP Databases on a Single System
Agenda
1 Introduction 2 Design of Disk Layout for SAP/Oracle Databases 3 Performance Tuning for the Journaled Filesystem 4 AIX 5L and the Enhanced Journaled Filesystem (JFS2) 5 Multiple SAP Databases on a Single System
Introduction
"A best practice is a technique or methodology that, through experience and research, has proven to reliably lead to a desired result." http://searchVB.com
Performance tuning as a holistic approach that involves all components of a system Explanation and advertising of new features implemented by hardware and software components
Agenda
1 Introduction 2 Design of Disk Layout for SAP/Oracle Databases 3 Performance Tuning for the Journaled Filesystem 4 AIX 5L and the Enhanced Journaled Filesystem (JFS2) 5 Multiple SAP Databases on a Single System
Elimination of arising hot spots via reorganization of tables into separate tablespaces Problem
Wasting of disk resources (e.g. Redologs) Complex and difficult administration of scattered data files
Mirroring
Use RAID -5 or RAID -10 Use "Middle" for ESS arrays to minimize seek
Placement Policy
IBM Global Services Disk Layout > Golden Rules for ESS (Shark)
OLTP Systems
200-300 GB Data per 2GBit Fibre Channel Port Large Cache Requirements
10
Agenda
1 Introduction 2 Design of Disk Layout for SAP/Oracle Databases 3 Performance Tuning for the Journaled Filesystem 4 AIX 5L and the Enhanced Journaled Filesystem (JFS2) 5 Multiple SAP Databases on a Single System
11
IBM Global Services Performance Tuning for JFS > JFS vs. Raw Devices
Filesystems are easier to manage for most administrators Journaled Filesystems ensure the integrity of the filesystem structure and data
Locking of filesystem structures prevents simultaneous access
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
12
IBM Global Services Performance Tuning for JFS > Areas of Tuning
Areas of Tuning
13 Oracle on AIX : Best Practices
Oracle Parameters init.ora Asynchronous I/O Read-Ahead File Caching Database Layout Multipath and SAN Cache and internal access Number and speed of drives
2003 IBM Corporation
IBM Global Services Performance Tuning for JFS > File Caching
File Caching
Memory is categorised into two different types
Computational memory: Consists of the pages that belong to working-storage or executable files. File memory: Consists of the remaining pages. These are usually pages from permanent data files in persistent storage.
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.
2003 IBM Corporation
14
IBM Global Services Performance Tuning for JFS > VMM Tuning
15
IBM Global Services Performance Tuning for JFS > Tuning Read-Ahead
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.
In case of a 6 CPU System this corresponds to ( < AIX 5.2) /usr/samples/kernel/vmtune -r 2 -R 64 -f 720 -F 784
16
IBM Global Services Performance Tuning for JFS > Read-Ahead for backup
Journaled Filesystem
maxpgahead = 256
High values of read-ahead might have negative effects on cache efficiency of disk subsystems for SAP production
Switch to these parameters only during backup
17
IBM Global Services Performance Tuning for JFS > Asynchronous I/O
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
18
IBM Global Services Performance Tuning for JFS > AIO Tuning Recommendation
The number of active aioservers can best be monitored with the performance tool "nmon"
http://www-106.ibm.com/developerworks/eserver/articles/analyze_aix/
19
Agenda
1 Introduction 2 Design of Disk Layout for SAP/Oracle Databases 3 Performance Tuning for the Journaled Filesystem 4 AIX 5L and the Enhanced Journaled Filesystem (JFS2) 5 Multiple SAP Databases on a Single System
20
22
IBM Global Services AIX 5L and JFS2 > Implications of direct I/O
Applications that see performance benefits when using raw logical volumes for storage are likely to benefit from the use of Direct I/O
23
e.g. Oracle
2003 IBM Corporation
IBM Global Services AIX 5L and JFS2 > Locking and serialization
Inode locks prevent concurrent modifications of files that lead to inconsistencies of data
JFS2 uses a read-shared write-exclusive lock Read and write serialization granularity is only at file level
Database applications are more sophisticated and have a finer granularity concerning locking and serializaton of access to data
Table locking Row-level locking
24
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
If only a subset of files in a filesystem should be opened in concurrent mode, the subdirectory can be mounted as namefs
mount v namefs o cio /somefs/subsomefs /somefs
Direct I/O is implicitly used with concurrent I/O Extension or truncation of files results in a change of the inode lock from shared to exclusive during the time of modification
25
Benchmark results
26
IBM Global Services AIX 5L and JFS2 > Tuning Parameters for JFS2
Values are preserved after reboot, if pre AIX 5.2 compatibility mode is switched off
chdev -l sys0 -a pre520tune=disable
27
Agenda
1 Introduction 2 Design of Disk Layout for SAP/Oracle Databases 3 Performance Tuning for the Journaled Filesystem 4 AIX 5L and the Enhanced Journaled Filesystem (JFS2) 5 Multiple SAP Databases on a Single System
28
29
IBM Global Services Multiple SAP Databases > Guidelines and hints
Oracle listeners
Separate listeners should be configured for each instance with unique port numbers
2003 IBM Corporation
30
IBM Global Services Multiple SAP Databases > Guidelines and hints SAP
31
Workload Management
Workload Management included in AIX at no additional costs
Easy setup for SAP and Oracle (30 Minutes) Passive mode for testing, performance monitoring and accounting
32
IBM Global Services Multiple SAP Databases > Workload Management Example
33
Summary
Modern disk subsystems facilitate database layouts through large caches and internal striping and mirroring Correct configuration of file cache in AIX prevents waste of memory Sufficient asynchronous I/O server processes are key to good performance JFS2 offers almost raw device performance with concurrent I/O Workload Manager in passive mode ideal for monitoring
34
Questions ... ?
November 2003
Agenda
1 Introduction 2 Design of Disk Layout for SAP/Oracle Databases 3 Performance Tuning for the Journaled Filesystem 4 AIX 5L and the Enhanced Journaled Filesystem (JFS2) 5 Multiple SAP Databases on a Single System 6 References
36
References
IBM Redbooks and Redpapers at www.redbook.ibm.com
"A holistic approach to a reliable infrastructure for SAP R/3", SG24-5050 "Consolidating multiple SAP systems on one pSeries", REDP-3626-00
37