Tutorial3 Oracle

download Tutorial3 Oracle

of 16

Transcript of Tutorial3 Oracle

  • 8/20/2019 Tutorial3 Oracle

    1/42

  • 8/20/2019 Tutorial3 Oracle

    2/42

    Oracle Database 10g

    The Self-Managing Database

    Benoit Dageville

    Oracle [email protected]

  • 8/20/2019 Tutorial3 Oracle

    3/42

    Agenda

    Oracle10g: Oracle’s first generation of

    self-managing database

    Oracle’s Approach to elf-managing

    Oracle10g !anageabilit" #o$ndation

     A$tomatic Database Diagnostic !onitor %ADD!&

    elf-managing Components

    Concl$sion and #$t$re Directions

  • 8/20/2019 Tutorial3 Oracle

    4/42

    Oracle10g

  • 8/20/2019 Tutorial3 Oracle

    5/42

    Oracle10g

    Oracle10g is the latest version of the Oracle

    DB!' released earl" (00)

    One of the main foc$s of that release *as self-

    management + ,ffort initiated in Oraclei

    O$r vision *hen *e started this vent$re fo$r

    "ears ago: mae Oracle f$ll" self-manageable /e believe Oracle10g is a giant step to*ard this

    goal

  • 8/20/2019 Tutorial3 Oracle

    6/42

    Oracle’s

    Approach

  • 8/20/2019 Tutorial3 Oracle

    7/42

    Oracle’s Approach: Server Resident

    echnolog" b$ilt inside the database server  + ,liminate management problems rather than hiding2 them

    behind a tool

     + !inimi3e 4erformance 5mpact

     +

     Act 6$st in ime2 %e.g. p$sh vers$s p$ll& + 7everage e8isting technolog"

     + ,ffective sol$tions re9$ire complete integration *ith vario$sserver components

    server becoming so sophisticated that a tool based

    sol$tion can no longer be tr$l" effective + !andator" if the end-goal is to b$ild a tr$l" self-managing database server 

  • 8/20/2019 Tutorial3 Oracle

    8/42

    Oracle’s Approach: Seamless !"

    "ntegration

  • 8/20/2019 Tutorial3 Oracle

    9/42

    Oracle’s Approach: #olistic

     Avoid a collection of point sol$tions

    5nstead' b$ild a comprehensive sol$tion + Core manageabilit" infrastr$ct$re

    Comprehensive statistics component

    /orload epositor"

    erver based alerts

     Advisor" frame*or

     + Central self-diagnostic engine b$ilt into core database %A$tomatic DatabaseDiagnostic !onitor or ADD!&

     + elf-managing Components

     A$to !emor" !anagement' A$tomatic ;7 $ning' A$tomatic torage!anagement' Access Advisor' A$to

  • 8/20/2019 Tutorial3 Oracle

    10/42

    Oracle’s Approach: O$t-of-bo%

    !anageabilit" feat$res are enabled b" defa$lt + #eat$res m$st be ver" rob$st

     + !inimal performance impact

     + O$tperform man$al sol$tion

     + elf-managing sol$tion has to be self-manageable>

    ?ero administrative b$rden on DBAs

    ,8amples + tatistics for manageabilit" enabled b" defa$lt

     +  A$tomatic performance anal"sis ever" ho$r

     +  A$to !emor" !anagement of ;7 memor" is defa$lt

     + Optimi3er statistics refreshed a$tomaticall"

     + 4redefined set of server alerts %e.g. space' =& +  And m$ch more=..

  • 8/20/2019 Tutorial3 Oracle

    11/42

    7o* ,nd C$stomers + o dedicated administrative staff 

     +  A$tomated da" to da" operations

     Optimal performance o$t of the bo8' no need to set config$rationparameters

    igh ,nd C$stomers + #le8ibilit" to adapt prod$ct to their needs

     + elf-management feat$res sho$ld o$tperform man$al t$ning andens$re predictable behavior 

     + eed to $nderstand and monitor f$nctioning of self-management

    operations

     elp DBAs in maing administrative decisions %no need for DBA tobe rocet scientist>&

     An" *orload: O74' D' mi8ed

    Oracle’s Approach:Manageabilit& for All

  • 8/20/2019 Tutorial3 Oracle

    12/42

    Application ' S()Management

    S&stem Reso$rceManagement

    SpaceManagement

    *ac+$p ' Recover&Management

    StorageManagement

    Database,ontrol

    .M/

    ADDM

    Oracle’s Approach: Manageabilit& Architect$re

    Manageabilit& "nfrastr$ct$re

  • 8/20/2019 Tutorial3 Oracle

    13/42

    Manageabilit& "nfrastr$ct$re

    Application ' S()Management

    S&stem Reso$rceManagement

    SpaceManagement

    *ac+$p ' Recover&Management

    StorageManagement

    ADDM

    Manageabilit& "nfrastr$ct$re

  • 8/20/2019 Tutorial3 Oracle

    14/42

    Manageabilit& "nfrastr$ct$re:Overvie

    or+load Statistics

    S$bs&stem

    A$tomatic Maintenance Tas+"nfrastr$ct$re

    Server-generated Alert"nfrastr$ct$re

    Advisor&"nfrastr$ct$re

    #o$ndation for elf-managing  or+load Statistics S$bs&stem

     –  "ntelligent Statistics –  AR: 2Data areho$se3 of

    the Database

    A$tomatic Maintenance Tas+s –  4re-pac+aged5 reso$rce

    controlled

    Server-generated Alerts –  4$sh vs6 4$ll5 7$st-in-time5

    O$t-of-the-bo%

    Advisor& "nfrastr$ct$re –  "ntegrated5 $niformit&5 enable

    inter-advisor comm$nication

  • 8/20/2019 Tutorial3 Oracle

    15/42

    Statistics: Overvie

    ADDM

    Alerts

    "n memor&statistics

    or+load Repositor&

    Shared-Memor&

    89 8ies

    #istoricalStatistics

    Statistic Snapshot

  • 8/20/2019 Tutorial3 Oracle

    16/42

    Statistics: ,lasses

    Database ime !odel

     +

  • 8/20/2019 Tutorial3 Oracle

    17/42

    Statistics: Database Time Model

    Operation Centric + Connection !anagement + Compilation + ;7' 47;7 and 6ava e8ec$tion

    times

    User I/O 

     Application

    Cluster Concurrency 

    SQL Exec 

    PLSQL Exec 

     Connection Mgmt 

    Compilation

    Java Exec 

    eso$rce Centric + ard*are: C4

  • 8/20/2019 Tutorial3 Oracle

    18/42

    Statistics: Sampled DatabaseActivit&

    5n-memor" log of e" attrib$tes of databasesessions activit"

  • 8/20/2019 Tutorial3 Oracle

    19/42

    Statistics: Sampled DatabaseActivit&

    D* Time

    5DF(1G

    /A55E

    tate

    Bloc read9aG()ffritcf (1GH:GI:(J

    /ait;7 5D!od$le5Dime

    C4

  • 8/20/2019 Tutorial3 Oracle

    20/42

    Statistics: hat-if Overvie/

    4redict performance impact of changes in amo$nt of memor" allotted to acomponent' both decrease and increase.

    ighl" acc$rate' maintained a$tomaticall" b" each memor" component basedon *orload.

  • 8/20/2019 Tutorial3 Oracle

    21/42

    Statistics: hat-if .%ample/

    ed$cing b$ffer cache si3e to 10!B increases 5Os b" a (.K factor 

    5ncrease b$ffer cache si3e to K0!B *ill red$ce 5Os b" (0M

    89D*,A,#.AD8",.

  • 8/20/2019 Tutorial3 Oracle

    22/42

    *ase Statistics = e6g6 S()

    !aintained b" the Oracle c$rsor cache

    ;7 id + $ni9$e te8t signat$re

    ime model brea-do*n ampled bind val$es

    ;$er" ,8ec$tion 4lan

    #ine-grain ,8ec$tion tatistics %iterator level&

    ,fficient top ;7 identification $sing Ns

  • 8/20/2019 Tutorial3 Oracle

    23/42

    AR: A$tomatic or+loadRepositor&

    elf-!anaging epositor" of Database /orload tatistics + 4eriodic snapshots of in-memor" statistics stored in database

     + Coordinated data collection across cl$ster nodes

     +  A$tomaticall" p$rge old data $sing time-based partitioned tables

     +

    O$t-Of-he-Bo8: H da"s of data' 1-ho$r snapshots Content and ervices

     + ime model' ampled DB Activit"' op ;7' op obects' =

     + ;7 $ning ets to manage ;7 /orloads

    Cons$mers

     +  ADD!' Database Advisors %;7 $ning' pace' =&' ... + istorical performance anal"sis

  • 8/20/2019 Tutorial3 Oracle

    24/42

    A$tomatic DatabaseDiagnostic Monitor ADDM/

    Application ' S()Management

    S&stem Reso$rce

    Management

    SpaceManagement

    *ac+$p ' Recover&Management

    Storage

    Management

    ADDM

    Manageabilit& "nfrastr$ct$re

  • 8/20/2019 Tutorial3 Oracle

    25/42

    ADDM: Motivation

      4roblem: 4erformance t$ning re9$ires high-e8pertise and ismost time cons$ming tas

    4erformance and /orload Data Capt$re + "stem tatistics' /ait 5nformation' ;7 tatistics' etc.

     Anal"sis + /hat t"pes of operations database is spending most time on

     + /hich reso$rces is the database bottleneced on

     + /hat is ca$sing these bottlenecs

     + /hat can be done to resolve the problem

    4roblem esol$tion + 5f m$ltiple problems identified' *hich is most critical + o* m$ch performance gain 5 e8pect if 5 implement this sol$tion

  • 8/20/2019 Tutorial3 Oracle

    26/42

    ADDM: Overvie

    Diagnose component of the s"stem *ide self-managing loop = and the entr" point of the resolve phase

    Central !anagement ,ngine + 5ntegrate all components together 

     + olistic time based anal"sis

     + hro$ghp$t centric top-do*n approach + Disting$ish s"mptoms from ca$ses %i.e root ca$se anal"sis&

    $ns proactivel" o$t of the bo8 %once ever" ho$r& + es$lt of each anal"sis is ept in the *orload repositor"

    Can be $sed reactivel" *hen re9$ired

     ADD! is the s"stem-*ide optimi3er of the database

  • 8/20/2019 Tutorial3 Oracle

    27/42

    S()Advisor 

    #igh-load

    S()

    "O > ,4!

    iss$esRA, iss$es

    A$tomatic Diagnostic .ngine

    Snapshots in

    A$tomatic or+load

    Repositor&

    Self-Diagnostic .ngine

    S&stemReso$rce

    Advice

    ;etor+ ?D* config

    Advice

    op Do*n Anal"sis

  • 8/20/2019 Tutorial3 Oracle

    28/42

    ADDM: Methodolog&4roblem classification s&stem 

    Decision tree based on the /ait !odel and ime !odel……

    Wait Model

    Cluster 

    User I/O

    Concurrency

    ……

    Buffer Busy

    Parse Latches

    Buf Cache latches

    ……

    Root CausesSymptoms

  • 8/20/2019 Tutorial3 Oracle

    29/42

    ADDM: Ta%onom& of indings

    ard*are eso$rce 5ss$es + C4< %capacit"' top-s9l' =&

     + 5Os %capacit"' top-s9l' top-obects' $ndersi3ed memor" cache& + Cl$ster 5nterconnect

     + !emor" %O paging&

    oft*are eso$rce 5ss$es

     +  Application locs

     + 5nternal contention %e.g. access to db b$ffers&

     + Database Config$ration

     Application 5ss$es + Connection management

     + C$rsor management %parsing' fetching' =&

  • 8/20/2019 Tutorial3 Oracle

    30/42

    ADDM: Real-orld .%ample eported b" ;$alcomm *hen $pgrading to Oracle10g

     After $pgrading' ;$alcomm noticed severe performance degradation

    7ooed at last ADD! report

     ADD! *as reporting high-cp$ cons$mption

     + and identified the root ca$se: a ;7 statement

     ADD! recommendation *as to t$ne this statement $sing A$tomatic ;7

    t$ning  A$tomatic ;7 t$ning identified missing inde8. he inde8 *as created and

    performance iss$e *as solved

    5n this partic$lar case' inde8 *as dropped b" accident d$ring the $pgradeprocess>

  • 8/20/2019 Tutorial3 Oracle

    31/42

    Self-managing ,omponents

    Application ' S()Management

    S&stem Reso$rce

    Management

    SpaceManagement

    *ac+$p ' Recover&Management

    Storage

    Management

    ADDM

    Manageabilit& "nfrastr$ct$re

  • 8/20/2019 Tutorial3 Oracle

    32/42

    Self-managing,omponents

    4erformance

    ADDM/

    A$to S() T$ning

    Access Advisor 

    Memor&

    Space

    A$to Managed

    4rivate - S()/

    A$to Managed

    Shared - 4ools/

    Segment Advisor 

    !ndo Advisor 

    A$to StorageManagement

    Administration

    S()

    *ac+$p>Recover&

    Reso$rceManager 

    RMA;

    lashbac+

    A$to MTTR

    A$to Stat ,ollect

    Server Alerts

  • 8/20/2019 Tutorial3 Oracle

    33/42

    hared !emor" !anagement +

     A$tomaticall" si3e vario$s shared memor" pools %e.g. b$ffer pool' sharedpool' ava pool&

     +

  • 8/20/2019 Tutorial3 Oracle

    34/42

    A$tomatic Shared-Memor&Management: T$ning 4ool SiBes

    7ava 4ool

    Shared 4ool

    *$ffer ,ache

    7ava 4ool

    Shared 4ool

    *$ffer ,ache

    A$tomaticMemor& Manager 

    Reconfig$re4rocess

  • 8/20/2019 Tutorial3 Oracle

    35/42

    A$tomatic S() T$ning: ,oncept

    D*A

    #igh-)oadS()

    ADDM

    S()or+load

    C

    Add Missing"nde%es

    Modif& S(),onstr$cts

    ,reate a S()4rofile

    ather Missingor Stale Stats

    A$tomatic S()T$ning

    S() 4rofiling

    Access 4athAnal&sis

    S() Str$ct$reAnal&sis

    S() T$ne

    Advisor 

  • 8/20/2019 Tutorial3 Oracle

    36/42

    A$tomatic S() T$ning: Overvie

    4erformed b" the Oracle 9$er" optimi3er r$nning in t$ning

    mode +

  • 8/20/2019 Tutorial3 Oracle

    37/42

    A$tomatic S() T$ning: S() 4rofiling

    OptimiBer T$ningMode/

    creates$bmit

    S() 4rofiling

    OptimiBer ;ormal Mode/

    o$tp$ts$bmit

    S()4rofile

    S() T$ningAdvisor 

    Database

    !sers

    ell-T$ned

    4lan

    After C   $  s  e

    4ersistent: *ors across sh$tdo*ns and $pgrades

    ;7 profiling ideal for pacaged applications %no change to ;7 te8t&

  • 8/20/2019 Tutorial3 Oracle

    38/42

    S() 4rofiling: 4erformance.val$ation

    Time -s/

    1

    10

    100

    1000

    10000

    1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69

    Queries

  • 8/20/2019 Tutorial3 Oracle

    39/42

    A$tomatic S() T$ning: hat-ifAnal&sis

    chema changes: invoes access advisor  + Comprehensive inde8 sol$tions %b-tree' bitmap' f$nctional&

     + !ateriali3ed vie*s recommendations ma8imi3ing 9$er" re*rite *hileminimi3ing maintenance cost

     +  An" combination of the above t*o %e.g. ne* !P *ith an inde8 on it&

     + Consider the entire ;7 *orload

    ;7 tr$ct$re Anal"sis + elp apps developers to identif" badl" *ritten statements

     + $ggest restr$ct$ring for efficienc" b" anal"3ing e8ec$tion plan

     + ol$tion re9$ires changes in ;7 semantic  different from optimi3era$tomatic re*rite and transformation

     + 4roblem categor"

    emantic changes of ;7 operators %O 5 vers$s O ,R5&

    "ntactic change to predicates on inde8 col$mn %e.g. remove t"pemismatch to enable inde8 $sage&

    ;7 design %add missing oin predicates&

  • 8/20/2019 Tutorial3 Oracle

    40/42

    ,oncl$sion ' $t$re Directions

    Oracle10g maor milestone in the Oracle’smanageabilit" 9$est

     + !anageabilit" fo$ndation

     + olistic !anagement Control %ADD!&

     + elf-manageable components

    #$t$re + Oracle11g: find an ,P, for ADD!

     +

    ,ven more self-manageable b" f$ll" a$tomatingthe resolve phase

  • 8/20/2019 Tutorial3 Oracle

    41/42

    More "nformation@

    Automatic SQL Tuning in Oracle10g,B. age!ille, . a" #. ia", #. $agou%, &. 'ait,&. 'iau((in, )LB 2004Industrial Session 4: Thursday 11:00- 12:30  

    SQL memor* management in Oracle9i,B. age!ille an( &. 'ait, )LB 2002

    Oracle Tec+nical a-er"http:***.oracle.comtechnolog"prod$ctsmanageabilit"

    databaseinde8.html 

  • 8/20/2019 Tutorial3 Oracle

    42/42