You are previewing Oracle Internals: An Introduction.
O'Reilly logo
Oracle Internals: An Introduction

Book Description

This concise book contains detailed information about Oracle internals -- information that's not readily available to Oracle customers. It lays a foundation for advanced performance tuning of the Oracle database. Based on Oracle8i release 8.1, the book describes many of the secrets of Oracle's internal services: data structures, algorithms, and undocumented Oracle system statistics. Main topics include:

  • Waits - how Oracle processes communicate via semaphores, and how to use the Oracle wait statistics to identify the source of performance problems.

  • Latches - how they keep multiple processes from inspecting protected data structures at the same time, and how to examine and control latch behavior and statistics.

  • Locks - how they work with latches to protect data structures (locks allow multiple sessions to share resources in some cases), and how locks affect performance. There is also a detailed discussion of instance locks, which are used in parallel server environments.

  • Memory - how Oracle uses memory (e.g., the various elements of the System Global Area), and how Oracle dynamically allocates and manages memory.

  • Oracle8i Internal Services is aimed especially at administrators and developers who need detailed internal information to do advanced performance tuning. The book will expand your repertoire of tuning solutions and troubleshooting techniques by explaining how you can use Oracle's hidden parameters and undocumented system statistics to best advantage. NOTE: The author has collected the scripts he has developed for tuning and analysis into a toolkit (known as APT, for Advanced Performance Tuning). These scripts access the Oracle X$ tables directly and provide information not otherwise available. The scripts are available to readers for free from the O'Reilly web site.

    Table of Contents

    1. Oracle Internals: An Introduction
      1. Preface
        1. Why This Book?
        2. Warnings
        3. Audience for This Book
        4. About the APT Scripts
        5. Conventions Used in This Book
        6. Comments and Questions
        7. Acknowledgments
      2. 1. Introduction
        1. The Oracle Kernel Layers
        2. The Kernel Services
      3. 2. Waits
        1. Semaphores
          1. Semaphore Facilities
          2. Scheduling Latencies
          3. Timeouts
        2. Wait Statistics
          1. Timed Statistics
          2. Wait Types
          3. Session Waits
          4. Wait Parameters
        3. Reference
          1. Parameters
          2. Events
          3. Statistics
          4. APT Scripts
      4. 3. Latches
        1. Latches and Locks
        2. Parent and Child Latches
        3. Latch Gets
          1. Willing-to-Wait Mode
            1. Why spin?
            2. Understanding the spin statistics
            3. Tuning the spin count
          2. Sleeps
          3. Latch Wait Posting
          4. Latch Contention
          5. Latch Levels
          6. No-Wait Mode
          7. Latch Cleanups
          8. DLM Latches
        4. Advanced Latching Control
          1. Preemption Control
          2. CPU Yielding
          3. Affinity Control
        5. Reference
          1. Parameters
          2. Statistics
          3. Waits
          4. APT Scripts
      5. 4. Locks
        1. Lock Usage
          1. Transaction Locks and Row-Level Locks
          2. Buffer Locks
          3. Data Dictionary Locks
        2. Lock Modes
        3. Enqueue Locks
          1. Enqueue Resources
          2. Enqueue Locking
          3. Enqueue Waits
          4. Deadlock Detection
          5. Blocking Locks
          6. Distributed Transactions
          7. ITL Entry Shortages
        4. Row Cache Enqueues
        5. Library Cache Locks and Pins
        6. DML Locks
          1. Disabling DML Locks
        7. Buffer Locks
        8. Sort Locks
        9. Reference
          1. Parameters
          2. Events
          3. Statistics
          4. Waits
          5. APT Scripts
      6. 5. Instance Locks
        1. The Lock Manager
          1. The Instance Lock Database
          2. Lock Mastering
          3. Lock Handle Acquisition
          4. Instance Lock Acquisition
          5. LCKn Processes
          6. Lock Value Blocks
        2. Global Locks
          1. Row Cache Instance Locks
          2. Global Enqueues
          3. Cross-Instance Calls
          4. Library Cache Instance Locks
        3. PCM Instance Locks
          1. Fixed Lock Elements
          2. Hashed Locking
          3. Fine-Grained Locking
          4. The Lock Element Free List
          5. PCM Lock Acquisition
          6. Block Pings
          7. Consistent Read Requests
          8. Deferred Ping Responses
          9. Workload Partitioning
          10. Blocking Factor
        4. Other Instance Locks
        5. Reference
          1. Parameters
          2. Events
          3. Statistics
          4. Waits
          5. APT Scripts
      7. 6. Memory
        1. The SGA
          1. The SGA Areas
            1. The fixed area
            2. The variable area
            3. The database block buffers
            4. The log buffer
            5. The instance lock database
            6. Overhead
          2. Shared Memory
            1. Virtual memory addressing
            2. Memory access
            3. Process memory segments
            4. Intimate shared memory
            5. SGA allocation
            6. Paging
        2. The Shared Pool
          1. Chunks
          2. Free Lists
          3. LRU Lists
          4. Spare Free Memory
          5. The Reserved List
          6. Marking Objects for Keeping
          7. Flushing the Shared Pool
          8. Heaps and Subheaps
          9. The Large Pool
        3. Process Memory
          1. The PGA
          2. The UGA
          3. The CGA
          4. Process Memory Allocation
          5. Process Memory Deallocation
        4. Reference
          1. Parameters
          2. Events
          3. Statistics
          4. APT Scripts
      8. Index
      9. Colophon