SlideShare une entreprise Scribd logo
1  sur  32
Oracle 10g
Advanced Performance Tuning
                        Kyle Hailey
                    KyleLF@gmail.com
                         Delphix
       http://oraclemonitor.com - wait events docs
  http://ashmasters.com – tools S-ASH and ASHMON
   http://www.perfvision.com/ftp/switz - power points
Who is Kyle Hailey


 1990 Oracle
       90 support
       92 Ported v6
       93 France
       95 Benchmarking
       98 ST Real World Performance

   2000 Dot.Com
   2001 Quest
   2002 Oracle OEM 10g                Success!
   2006 Independent                   First successful OEM design
   2008 Embarcadero
       DB Optimizer
 2010 Delphix
My Goal



          Simplify the information
          and empower the DBA




                   Copyright 2006 Kyle Hailey
                               3
Launch: Pressure

        Midnight before
        January 28, 1986
        Lives are on the line




                          Thanks to Edward Tufte
13 Pages Faxed




                 Copyright 2006 Kyle Hailey
Original Engineering data


                        “damages at the hottest
                        and coldest temperature”
                        - management




only showed damage

                                       Copyright 2006 Kyle Hailey
Congressional Hearings Evidence




                                  Copyright 2006 Kyle Hailey
Clearer

12                                     12



 8                                     8




 4
     X                                 4




         30   35       40   45    50        55   60   65   70       75        80


                   1. Include successes
                   2. Mark Differences
                   3. Normalize same temp
                   4. Scale known vs unknown

                                                                Copyright 2006 Kyle Hailey
Difficult

  NASA Engineers Fail
  Congressional Investigators Fail
  Data Visualization is Difficult


   But …

      Lack of Clarity can be devastating



                                           Copyright 2006 Kyle Hailey
Solutions

 Clear Identification
      Know how to identify problems and issues


 Access to details
      Provide solutions and/or information to address the issues


 Graphics
      Easy understanding, effective communication and discussion
First Step: Graphics

  “The humans … are exceptionally good at
   parsing visual information, especially
   when that information is coded by color
   and/or               _____ .”
   motion
   Knowledge representation in cognitive science. Westbury, C. & Wilensky, U. (1998)
Why Use Graphics
  You can't imagine how many times I was told that nobody wanted or
   would use graphics …
   -- Jef Raskin, the creator of the Macintosh


   Infocus – (overhead projectors) sited a
   study that humans can parse graphical
   information 400,000 times faster than
   textual data
Counties in US
 3101 Counties in US
 50 pages




                        13
“If I can't picture it, I can't understand it”
   - Albert Einstein
                                                   Anscombe's Quartet
                                 I                  II          III              IV
                     x          y            x       y      x     y        x       y
                          10          8.04        10   9.14    10     7.46       8     6.58
                           8          6.95         8   8.14     8     6.77       8     5.76
                          13          7.58        13   8.74    13 12.74          8     7.71
                           9          8.81         9   8.77     9     7.11       8     8.84
                          11          8.33        11   9.26    11     7.81       8     8.47
                          14          9.96        14    8.1    14     8.84       8     7.04
                           6          7.24         6   6.13     6     6.08       8     5.25
                           4          4.26         4    3.1     4     5.39      19     12.5
                          12         10.84        12   9.13    12     8.15       8     5.56
                           7          4.82         7   7.26     7     6.42       8     7.91
                           5          5.68         5   4.74     5     5.73       8     6.89
 Average                   9           7.5         9    7.5     9      7.5       9      7.5
 Standard
 Deviation               3.31         2.03       3.31   2.03   3.31    2.03    3.31    2.03
 Linear Regression       1.33                    1.33          1.33            1.33
Graphics for Anscombe’s Quartet
Tuning the Database

                                      Complex
        What is a day in the life look like
                  Averages
        for a DBA who has performance
        issues?
                                                    Anscombe's Quartet
                                  I                  II           III              IV
                      x          y           x        y      x      y       x        y
 Average                     9         7.5          9    7.5      9     7.5        9      7.5
 Standard Deviation       3.31        2.03       3.31   2.03   3.31    2.03     3.31     2.03
 Linear Regression        1.33                   1.33          1.33             1.33
How Can We Open the Black Box?



                LOAD
                                       Max CPU
               Top                     (yard stick)
               Activity
                                      Click here
         SQL      Events   Sessions
                                                Get Details
How Can We Open the Black Box?

  OEM          ASHMON/SASH DB Optimizer




   •Powerful - Identifies issues quickly and powerfully
   •Interactive - Allows exploring the data

   •Easy - Understandable by everyone, DBA, Dev and Managers !
Ideas for Today

                   AAS

                  ASH

            Sampling

                  Waits
                  Copyright 2006 Kyle Hailey
Sections
   http://oraclemonitor.com – wait documentation

Day 1             Day 2                            Day 3
 New Ideas        Waits                           SQL Tuning
   Statspack          Buffer      Cache
   ASH                IO

   AAS                Redo

   OEM   10g          Enqueues
                       SharedPool
                       SQL*Net




                      Copyright 2006 Kyle Hailey
Do You Want?
      Engineering Data?




                          Copyright 2006 Kyle Hailey
Do You Want?
       Pretty Pictures




                         Copyright 2006 Kyle Hailey
Do You Want?
                Clean and Clear




   ?   ?    ?     ?
   ?    ?



                                  Copyright 2006 Kyle Hailey
Imagine Trying to Drive your Car
Would you want your dashboard to look like :




                         And is updated once and hour



                                Or would you like it to
                                look …




                                                          Copyright 2006 Kyle Hailey
Or This




          Copyright 2006 Kyle Hailey
Summary

1.Database - AAS
     Profile database
     Use wait interface and graphics
     Identify machine, application, database or SQL


1.SQL - VST
     Indexes, stats, execution path
     Visual SQL Tuning
Bibliography




 Refactoring SQL Applications – Stephane Faroult
 Troubleshooting Oracle Performance – Christian Antognini
 SQL Tuning – Dan Tow
 Cost-Based Oracle Fundamentals – Jonathan Lewis
    http://www.simple-talk.com/sql/performance/designing-efficient-sql-a-visual-approach/
END




  Copyright 2006 Kyle Hailey
When to Tune
1. Machine
  a)       CPU
            Response times skewed
            100% CPU might be fine
            Users wait in queue (run queue) => machine
             underpowered
  a)       Memory
            Paging
            Wait times skewed (ex : latch free)
            Erratic response times ( ex : ls )



1. Oracle                                                                           Host        CPU
                                                                                                Memory

  1)       Waits > CPU ?                                                         Oracle Load
                                                                                   (AAS)
            tune waits
                                                                                      AAS >

  1)       CPU > 100% ?                                                               #CPU

                                                                                  Waits >       CPU >
            tune top CPU SQL                                       AAS > 1       CPU           Waits
                                                                   Top Session     Top Wait     Top SQL
  1)       Else
            It’s the application
                                                   Object Detail    SQL Detail    Wait Detail   Session Detail   File Detail
Machine
 Make sure the machine is healthy before tuning Oracle
  CPU => use run queue, < 2 * #CPU
  Memory => page out


 VMSTAT
Summary

1.Machine - vmstat
     Memory, CPU (we can see IO response in Oracle)


1.Database - AAS
     Use wait interface and graphics
     Identify machine, application, database or SQL


1.SQL - VST
     Indexes, stats, execution path
     Visual SQL Tuning
How Can We Open the Black Box?

  OEM        ASHMON/SASH DB Optimizer




   •Powerful - Identifies issues quickly and powerfully
   •Interactive - Allows exploring the data
   •Easy - Understandable by everyone, DBA, Dev and
   Managers !

Contenu connexe

Similaire à 00 intro

Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
cookie1969
 
Get Competitive with Driverless AI
Get Competitive with Driverless AIGet Competitive with Driverless AI
Get Competitive with Driverless AI
Sri Ambati
 
My perfect production - talk
My perfect production - talkMy perfect production - talk
My perfect production - talk
Sergio Falletti
 
Progressive loss report_0608_appendix
Progressive loss report_0608_appendixProgressive loss report_0608_appendix
Progressive loss report_0608_appendix
finance18
 
Big data big_skills_data_visualization
Big data big_skills_data_visualizationBig data big_skills_data_visualization
Big data big_skills_data_visualization
Kyle Hailey
 
Back To The Future.Key 2
Back To The Future.Key 2Back To The Future.Key 2
Back To The Future.Key 2
gueste8cc560
 

Similaire à 00 intro (20)

Graphical Analysis of PV Plant Data
Graphical Analysis of PV Plant DataGraphical Analysis of PV Plant Data
Graphical Analysis of PV Plant Data
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
 
Get Competitive with Driverless AI
Get Competitive with Driverless AIGet Competitive with Driverless AI
Get Competitive with Driverless AI
 
Castle enhanced Cassandra
Castle enhanced CassandraCastle enhanced Cassandra
Castle enhanced Cassandra
 
Introduction SQL Analytics on Lakehouse Architecture
Introduction SQL Analytics on Lakehouse ArchitectureIntroduction SQL Analytics on Lakehouse Architecture
Introduction SQL Analytics on Lakehouse Architecture
 
Free Training: How to Build a Lakehouse
Free Training: How to Build a LakehouseFree Training: How to Build a Lakehouse
Free Training: How to Build a Lakehouse
 
Information Visualization: See Patterns, Gain Insights & Make Decisions
Information Visualization: See Patterns, Gain Insights & Make DecisionsInformation Visualization: See Patterns, Gain Insights & Make Decisions
Information Visualization: See Patterns, Gain Insights & Make Decisions
 
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
 
Lessons Learned From Running 1800 Clusters (Brooke Jensen, Instaclustr) | Cas...
Lessons Learned From Running 1800 Clusters (Brooke Jensen, Instaclustr) | Cas...Lessons Learned From Running 1800 Clusters (Brooke Jensen, Instaclustr) | Cas...
Lessons Learned From Running 1800 Clusters (Brooke Jensen, Instaclustr) | Cas...
 
Info vis 4-2012-part1
Info vis 4-2012-part1Info vis 4-2012-part1
Info vis 4-2012-part1
 
The State of BigData - meetup bigdata @ovh
The State of BigData  -  meetup bigdata @ovh The State of BigData  -  meetup bigdata @ovh
The State of BigData - meetup bigdata @ovh
 
My perfect production - talk
My perfect production - talkMy perfect production - talk
My perfect production - talk
 
Progressive loss report_0608_appendix
Progressive loss report_0608_appendixProgressive loss report_0608_appendix
Progressive loss report_0608_appendix
 
Information Visualization for Medical Informatics
Information Visualization for Medical Informatics Information Visualization for Medical Informatics
Information Visualization for Medical Informatics
 
RE-FRAC OF SHALE WELLS USING ARTIFICIAL INTELLIGENCE
RE-FRAC OF SHALE WELLS USING ARTIFICIAL INTELLIGENCERE-FRAC OF SHALE WELLS USING ARTIFICIAL INTELLIGENCE
RE-FRAC OF SHALE WELLS USING ARTIFICIAL INTELLIGENCE
 
10 Tips for Agile Adoption
10 Tips for Agile Adoption10 Tips for Agile Adoption
10 Tips for Agile Adoption
 
Big data big_skills_data_visualization
Big data big_skills_data_visualizationBig data big_skills_data_visualization
Big data big_skills_data_visualization
 
MySQL For Oracle Developers
MySQL For Oracle DevelopersMySQL For Oracle Developers
MySQL For Oracle Developers
 
Back To The Future.Key 2
Back To The Future.Key 2Back To The Future.Key 2
Back To The Future.Key 2
 
What Is Good DataViz Design?
What Is Good DataViz Design?What Is Good DataViz Design?
What Is Good DataViz Design?
 

Plus de Kyle Hailey

Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Kyle Hailey
 

Plus de Kyle Hailey (20)

Hooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume LelargeHooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume Lelarge
 
Performance insights twitch
Performance insights twitchPerformance insights twitch
Performance insights twitch
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle
 
Successfully convince people with data visualization
Successfully convince people with data visualizationSuccessfully convince people with data visualization
Successfully convince people with data visualization
 
Virtual Data : Eliminating the data constraint in Application Development
Virtual Data :  Eliminating the data constraint in Application DevelopmentVirtual Data :  Eliminating the data constraint in Application Development
Virtual Data : Eliminating the data constraint in Application Development
 
DBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentDBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application Development
 
Accelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual DataAccelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual Data
 
Delphix and Pure Storage partner
Delphix and Pure Storage partnerDelphix and Pure Storage partner
Delphix and Pure Storage partner
 
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Mark Farnam  : Minimizing the Concurrency Footprint of TransactionsMark Farnam  : Minimizing the Concurrency Footprint of Transactions
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata security
 
Martin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle GuysMartin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle Guys
 
What is DevOps
What is DevOpsWhat is DevOps
What is DevOps
 
Data as a Service
Data as a Service Data as a Service
Data as a Service
 
Data Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloningData Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloning
 
BGOUG "Agile Data: revolutionizing database cloning'
BGOUG  "Agile Data: revolutionizing database cloning'BGOUG  "Agile Data: revolutionizing database cloning'
BGOUG "Agile Data: revolutionizing database cloning'
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualization
 
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
 
Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix
 
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseOaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 

00 intro

  • 1. Oracle 10g Advanced Performance Tuning Kyle Hailey KyleLF@gmail.com Delphix http://oraclemonitor.com - wait events docs http://ashmasters.com – tools S-ASH and ASHMON http://www.perfvision.com/ftp/switz - power points
  • 2. Who is Kyle Hailey  1990 Oracle  90 support  92 Ported v6  93 France  95 Benchmarking  98 ST Real World Performance  2000 Dot.Com  2001 Quest  2002 Oracle OEM 10g Success!  2006 Independent First successful OEM design  2008 Embarcadero  DB Optimizer  2010 Delphix
  • 3. My Goal Simplify the information and empower the DBA Copyright 2006 Kyle Hailey 3
  • 4. Launch: Pressure Midnight before January 28, 1986 Lives are on the line Thanks to Edward Tufte
  • 5. 13 Pages Faxed Copyright 2006 Kyle Hailey
  • 6. Original Engineering data “damages at the hottest and coldest temperature” - management only showed damage Copyright 2006 Kyle Hailey
  • 7. Congressional Hearings Evidence Copyright 2006 Kyle Hailey
  • 8. Clearer 12 12 8 8 4 X 4 30 35 40 45 50 55 60 65 70 75 80 1. Include successes 2. Mark Differences 3. Normalize same temp 4. Scale known vs unknown Copyright 2006 Kyle Hailey
  • 9. Difficult  NASA Engineers Fail  Congressional Investigators Fail  Data Visualization is Difficult But … Lack of Clarity can be devastating Copyright 2006 Kyle Hailey
  • 10. Solutions Clear Identification  Know how to identify problems and issues Access to details  Provide solutions and/or information to address the issues Graphics  Easy understanding, effective communication and discussion
  • 11. First Step: Graphics “The humans … are exceptionally good at parsing visual information, especially when that information is coded by color and/or _____ .” motion Knowledge representation in cognitive science. Westbury, C. & Wilensky, U. (1998)
  • 12. Why Use Graphics You can't imagine how many times I was told that nobody wanted or would use graphics … -- Jef Raskin, the creator of the Macintosh Infocus – (overhead projectors) sited a study that humans can parse graphical information 400,000 times faster than textual data
  • 13. Counties in US  3101 Counties in US  50 pages 13
  • 14. “If I can't picture it, I can't understand it” - Albert Einstein Anscombe's Quartet I II III IV x y x y x y x y 10 8.04 10 9.14 10 7.46 8 6.58 8 6.95 8 8.14 8 6.77 8 5.76 13 7.58 13 8.74 13 12.74 8 7.71 9 8.81 9 8.77 9 7.11 8 8.84 11 8.33 11 9.26 11 7.81 8 8.47 14 9.96 14 8.1 14 8.84 8 7.04 6 7.24 6 6.13 6 6.08 8 5.25 4 4.26 4 3.1 4 5.39 19 12.5 12 10.84 12 9.13 12 8.15 8 5.56 7 4.82 7 7.26 7 6.42 8 7.91 5 5.68 5 4.74 5 5.73 8 6.89 Average 9 7.5 9 7.5 9 7.5 9 7.5 Standard Deviation 3.31 2.03 3.31 2.03 3.31 2.03 3.31 2.03 Linear Regression 1.33 1.33 1.33 1.33
  • 16. Tuning the Database Complex What is a day in the life look like Averages for a DBA who has performance issues? Anscombe's Quartet I II III IV x y x y x y x y Average 9 7.5 9 7.5 9 7.5 9 7.5 Standard Deviation 3.31 2.03 3.31 2.03 3.31 2.03 3.31 2.03 Linear Regression 1.33 1.33 1.33 1.33
  • 17. How Can We Open the Black Box? LOAD Max CPU Top (yard stick) Activity Click here SQL Events Sessions Get Details
  • 18. How Can We Open the Black Box? OEM ASHMON/SASH DB Optimizer •Powerful - Identifies issues quickly and powerfully •Interactive - Allows exploring the data •Easy - Understandable by everyone, DBA, Dev and Managers !
  • 19. Ideas for Today AAS ASH Sampling Waits Copyright 2006 Kyle Hailey
  • 20. Sections http://oraclemonitor.com – wait documentation Day 1 Day 2 Day 3  New Ideas  Waits  SQL Tuning  Statspack  Buffer Cache  ASH  IO  AAS  Redo  OEM 10g  Enqueues  SharedPool  SQL*Net Copyright 2006 Kyle Hailey
  • 21. Do You Want? Engineering Data? Copyright 2006 Kyle Hailey
  • 22. Do You Want? Pretty Pictures Copyright 2006 Kyle Hailey
  • 23. Do You Want? Clean and Clear ? ? ? ? ? ? Copyright 2006 Kyle Hailey
  • 24. Imagine Trying to Drive your Car Would you want your dashboard to look like : And is updated once and hour Or would you like it to look … Copyright 2006 Kyle Hailey
  • 25. Or This Copyright 2006 Kyle Hailey
  • 26. Summary 1.Database - AAS  Profile database  Use wait interface and graphics  Identify machine, application, database or SQL 1.SQL - VST  Indexes, stats, execution path  Visual SQL Tuning
  • 27. Bibliography Refactoring SQL Applications – Stephane Faroult Troubleshooting Oracle Performance – Christian Antognini SQL Tuning – Dan Tow Cost-Based Oracle Fundamentals – Jonathan Lewis http://www.simple-talk.com/sql/performance/designing-efficient-sql-a-visual-approach/
  • 28. END Copyright 2006 Kyle Hailey
  • 29. When to Tune 1. Machine a) CPU  Response times skewed  100% CPU might be fine  Users wait in queue (run queue) => machine underpowered a) Memory  Paging  Wait times skewed (ex : latch free)  Erratic response times ( ex : ls ) 1. Oracle Host CPU Memory 1) Waits > CPU ? Oracle Load (AAS)  tune waits AAS > 1) CPU > 100% ? #CPU Waits > CPU >  tune top CPU SQL AAS > 1 CPU Waits Top Session Top Wait Top SQL 1) Else  It’s the application Object Detail SQL Detail Wait Detail Session Detail File Detail
  • 30. Machine Make sure the machine is healthy before tuning Oracle  CPU => use run queue, < 2 * #CPU  Memory => page out VMSTAT
  • 31. Summary 1.Machine - vmstat  Memory, CPU (we can see IO response in Oracle) 1.Database - AAS  Use wait interface and graphics  Identify machine, application, database or SQL 1.SQL - VST  Indexes, stats, execution path  Visual SQL Tuning
  • 32. How Can We Open the Black Box? OEM ASHMON/SASH DB Optimizer •Powerful - Identifies issues quickly and powerfully •Interactive - Allows exploring the data •Easy - Understandable by everyone, DBA, Dev and Managers !

Notes de l'éditeur

  1. In Oracle Support I learned more faster than I think I could have anywhere. Porting gave me my first appreciation for the shareable nature of Oracle code and also a bit of disbelief that it worked as well as it did. Oracle France gave me an opportunity to concentrate on the Oracle kernel. At Oracle France I had 3 amazing experiences. First was being sent to the Europecar site where I first met a couple of the people who would later become the founding members of the Oaktable, James Morle and Anjo Kolk. The Europecar site introduced me to a fellow name Roger Sanders who first showed me the wait interface before anyone knew what it was. Roger not only used it but read it directly from shared memory without using SQL. Soon after Europecar I began to be sent often to benchmarks at Digital Europe. These benchmarks were some of my favorite work at Oracle. The benchmarks usually consisted of installing some unknown Oracle customer application and then having a few days to make it run as fast as possible. I first started using TCL/TK and direct shared memory access (DMA) at Digital Europe and got solid hands on tuning experience testing things like striping redo and proving it was faster long before people gave up arguing that this was bad from a theoretical point of view. Finally in France, my boss, Jean Yves Caleca was by far the best boss I ever had, but on top of that he was wonderful at exploring the depths of Oracle and explaining it to others, teaching me much about the internals of block structure, UNDO, REDO and Freelsits. I came back from France wanting to do performance work and especially graphical monitoring. The kernel performance group had limited scope in that domain, so I left for a dot com where I had my first run as the sole DBA for everything, backup, recovery, performance, installation and administration. I was called away by Quest who had my favorite performance tool Spotlight. It turns out thought that scope for expanding Spotlight was limited so I jumped at the chance in 2002 to restructure Oracle OEM. The work at OEM I’m proud of but still want to do much more to make performance tuning faster, easier and more graphical.
  2. What allows Oracle, all the dials and knobs, to be the fastest, most robust database on the market also make it one of the most complicated on the market. For those few users that know and love the 1000s of performance options in Oracle, access to those performance options through sql and C code is the defacto standard. For seasoned users it is often difficult to understand why anyone would want to be limited by a GUI which can often be slower, and almost always lacking the latest commands allowed through interfaces such as SQL and C. On the OEM side, when a new tuning feature in the kernel is externalized in OEM (Oracle Enterprise Manager) it is often difficult to see the forest for the tree, or where and how that new feature fits into the grand scheme of things.
  3. This presentation presented a challenge because many of the concepts were like the chicken and the egg. In order to explain one I needed the other. I’ve tried to keep the subjects as linear as possible but sometimes I interweave from one to another.
  4. In order to tune an Oracle database the first step in a complete analysis is to verify the machine because there are a couple of factors that can only be clearly determined by looking at machine statistics. Those two factors are Memory Usage CPU Usage Memory and CPU problems will have tell tale repercussions on Oracle performance statistics and thus can be deduced from just looking at the Oracle statistics, but it is clear just to start with the machine statistics. CPU For CPU, we check the “run queue” which is the number of processes that are ready to run but have to wait for the CPU. A machine free of CPU contention would have a run queue of 0 and could have CPU usage near 100% at the same time. A high CPU usage can be a good sign that the system is being utilized fully. On the other hand a high run queue will indicated that there is more demand for CPU than CPU power available. High run queue can be determined via Oracle statistics by looking at ASH data and seeing if more sessions are marked as being on the CPU than the number of CPUs available. For example if there are 4 sessions average active on CPU in the ASH data and only 2 CPUs then the machine is CPU bound. Solutions for high run queue are either to add more processors or reduce the load on the CPU. If the CPU is mainly being used by Oracle, then that is going to mean tuning the application and ther SQL queries. Memory If the machine is paging out to disk it means there is a memory crunch and can dramatically slow down Oracle. Oracle will sometimes indicate a paging problem through a spike in “latch free” waits but the only guarenteed method of diagnosing this problem is looking at the machine statistics. Machines have statistics for paging and free memory. Often there can be some free memory even when there is paging out because machines start paging out before memory is completely filled. Solutions if the machine is paging out are either to add more memory or to reduce memory usage. Memory usage can be reduced by reducing Oracle cache sizes or reducing Oracle session memory usage.