This is the complete, expert guide to building enterprise-class UNIX-based Oracle OLTP systems that deliver maximum performance and scalability. In Scaling Oracle 8i, one of the world's leading Oracle consultants introduces today's best methods and technologies for building industrial-strength Oracle database systems on UNIX platforms. Understand exactly what scalability means in the enterprise; then discover how to deliver it, step-by-step, from the ground up, through design, testing, construction, maintenance, benchmarking, and ongoing management. Morle covers every component that impacts performance, including hashing, caching, hardware architecture and I/O subsystems, Oracle database objects, data storage, memory structures, and a detailed review of the Oracle Parallel Server. Readers will find comprehensive coverage of tuning the underlying UNIX platform to improve OLTP response times; including co-engineering the kernel; working with virtual memory, I/O, interprocess communication; and more. Scaling Oracle 8i contains a full chapter on the special issues associated with e-commerce, as well as a detailed case study drawn from one of the world's largest car rental reservations systems. For all enterprise system architects, database engineers, and application developers working with Oracle.
Table of Contents
I. CONCEPTS AND ARCHITECTURE. 1. Scaling Concepts.
What Is Scaling?
Latches and Locks.
Things That Need Locking/Latching.
Waiting on Latches and Locks.
Design Considerations to Reduce Lock Contention.
What Is a Linked List?
What Are Linked Lists Used For?
Optimizing Chain Lengths.
What Is Hashing?
Cache Reference Patterns.
CPU Cache Concepts.
Further Reading.2. Hardware Architectures and I/O Subsystems.
Introduction to Hardware Architectures.
Direct Memory Access (DMA).
Single Processor Architectures (Uniprocessors).
Oracle on Uniprocessors.
Symmetric Multiprocessors (SMPs).
Oracle on SMP Architectures.
Massively Parallel Processors (MPPs).
Oracle on MPP Systems.
Cache Coherent Nonuniform Memory Access (ccNUMA).
Sequent NUMA-Q 20.
SGI Origin 20.
Oracle on NUMA Systems.
Disk Drive Sizing.
Cached Disk Arrays: EMC Symmetrix.
II. BUILDING SUPPORT SOFTWARE. 3. Benchmark Concepts and Design.
Why Develop a Benchmark?
What Are We Simulating?
Defining Application Areas.
Defining the Application Split.
Careful with Those Assumptions, Eugene.
Selecting a Development Approach.
Using Remote Terminal Emulation Software.
Custom Simulation Development.
Building a Simulator Using RTE Software.
Building a Custom Benchmark Suite.
When the Application Has Not Been Written.
If the Application Exists: Trap and Emulate All SQL Calls.
Using Tracefiles to Generate a Simulation: An Introduction to dbaman.
Validate Server-Side System Utilization.
Building a Multiuser Framework.
Scale the Simulator.
User Control Problems.
Simpler Methods for Use with dbaman.
Make It Easy to Run.
Automating Information Retrieval at Closedown.
Define Limitations in Advance.
A Benchmark Is Never Perfect.
Measure the Impact of the Inaccuracies.
Further Reading.4. System/Database Monitoring.
Proactive Fault Detection.
Rapid Fault Diagnosis.
Historical Performance Records.
Go Easy on the System.
Avoiding Single-Threaded Resources.
Introduction to V$ Views.
What Are the V$ Views ?
Accessing the V$ Views.
Structure of the V$ Views.
Overhead of Using V$ Views.
Using dbaman to Optimize Data Collection.
Defining the Cursors.
Parsing and Executing the SQL.
Process the Result Sets.
Pulling it Together with a Main Loop.
Defining the "Flight Envelope."
What Is a "Flight Envelope"?
How Do I Define a Flight Envelope for the System?
Using Excel Spreadsheets for Data Visualization.
III. HOW ORACLE WORKS. 5. Physical Oracle.
Redo Log Information.
The INIT.ORA File.
Rules for init.ora Creation.
Overview: The Physical Picture.
Blocks: An Introduction.
Key Database Objects.
Temporary Tablespaces and Temporary Segments.
Other Database Objects.
The Data Dictionary.
Further Reading.6. Oracle8 in Operation.
The Oracle Kernel.
The SGA Components.
Operation of the Buffer Cache.
Flowchart Summary of Buffer Cache Operation.
Shared Pool Structure.
Shared Pool: The Library Cache.
The Parsing Mechanism.
Other Memory Structures.
Oracle Parallel Server Concepts
Distributed Lock Manager (DLM).
Parallel Cache Management.
Design Considerations for OPS.
Further Reading for OPS.
V$ Views Exposed.
IV. HOW UNIX WORKS. 7. Introduction to UNIX.
What Is a Kernel?
Explicit Kernel Processing (Process Context Kernel Mode).
Implicit Kernel Processing (System Context Kernel Mode).
The Process "Table."
Memory Management: The Virtual Memory System.
Virtual Memory Introduction.
Virtual Memory Hierarchy.
The Memory/Disk Hierarchy.
Implementing the Hierarchy.
Implications of fork() and exec().
Everything Is a File.
Filesystems Versus Raw Disk.
Logical Volume Managers.
Interprocess Communication (IPC).
System V IPC.
More on System Calls.
Further Reading.8. Oracle User's Guide to UNIX.
Coengineering the Oracle Kernel.
Tcl and expect.
V. IMPLEMENTING ORACLE. 9. Scalable Transaction Processing.
As open systems continue to replace traditional mainframe systems, system scalability is becoming an increasingly important topic. Although far more flexible than mainframe systems, open systems applications tend to be less reliable and more difficult to scale. There is no cookbook approach to solving this challenge: A thorough understanding of the technologies involved is essential for designing scalable solutions that meet long-term business needs.
Scaling Oracle8i™ offers valuable insights and techniques for designing reliable and scalable online transaction processing (OLTP) applications using Oracle. This book focuses on providing the in-depth information about Oracle and the underlying hardware required to build systems that scale effectively.
You will find coverage of relevant hardware and I/O operation; benchmark and database monitoring systems; Oracle internals, operation, and implementation; and UNIX operating system issues that impact Oracle performance and scalability. Essential topics covered include:
- Critical scalability concepts, including latches and locks, lists, hashing, and caching
- A briefing on various hardware architectures, including symmetric multiprocessor, clustered SMP, ccNUMA, and massive parallel processors
- I/O technology, including the physical attributes of I/O systems and RAID technology
- Producing application benchmarks using Oracle trace files
- An introduction to the Tcl-based Oracle scripting tool dbaman, for easy, general purpose database programming
- Interrogating the Oracle fixed tables to derive operational data
- Oracle Parallel Server
- The inner workings of the UNIX kernel and virtual memory system
- Oracle's Virtual Operating System abstraction interface, including hardware vendor co-engineering
- Writing scalable SQL
- Using TP monitors
- Performance tuning
- Scaling large Oracle applications
In addition, a real-life case study of a large-scale Oracle system illustrates concepts, approaches, and experienced-based pointers for implementation. Scaling Oracle8i™ concludes with a look at Oracle's future, including its role in the emerging field of Internet OLTP development.
James Morle runs a specialist consulting company, Scale Abilities, that specializes in solving complex technical and architectural problems for leading companies. He has built a number of the world's largest and most challenging systems, including one of the first large Oracle Parallel Server systems. Specializing in high-performance scalable systems, his background is in Oracle and UNIX internals. He can be contacted directly at James.Morle@Scaleabilities.co.uk.