La présentation est en train de télécharger. S'il vous plaît, attendez

La présentation est en train de télécharger. S'il vous plaît, attendez

Lionel Frachon - SII Page 1 Statspack Analyse des statistiques générées.

Présentations similaires


Présentation au sujet: "Lionel Frachon - SII Page 1 Statspack Analyse des statistiques générées."— Transcription de la présentation:

1 Lionel Frachon - SII Page 1 Statspack Analyse des statistiques générées

2 Lionel Frachon - SII Page 2 Génération dun report (rappel) Après avoir pris les photos (« snapshots »), il suffit de lancer la procédure (sous lutilisateur concerné): /oracle/ora920/rdbms/admin/spreport.sql Paramètres : numéros de photos debut et fin, et nom de fichier

3 Lionel Frachon - SII Page 3 Statistiques inutiles Certaines statistiques dont les chiffres sont impressionnants nont aucun rapport avec une quelconque perte de performance. Ceci inclut notamment les timers (smon timer, pmon timer), les stats « SQL*Net », les stats rdbms …

4 Lionel Frachon - SII Page 4 Partie 1 : Informations relatives aux snapshots STATSPACK report for DB Name DB Id Instance Inst Num Release Cluster Host SILODECL SILODECL NO servdon1 Snap Id Snap Time Sessions Curs/Sess Comment Begin Snap: 5 16-Mar-04 15:34: End Snap: 9 16-Mar-04 15:59: Elapsed: (mins)

5 Lionel Frachon - SII Page 5 Partie 2 : Informations relatives à linstance (mémoires & accès) Cache Sizes (end) ~~~~~~~~~~~~~~~~~ Buffer Cache: 64M Std Block Size: 8K Shared Pool Size: 80M Log Buffer: 512K Load Profile ~~~~~~~~~~~~ Per Second Per Transaction Redo size: 1, , Logical reads: 4, , Block changes: Physical reads: , Physical writes: User calls: , Parses: Hard parses: Sorts: Logons: Executes: Transactions: 0.01 % Blocks changed per Read: 0.06 Recursive Call %: Rollback per transaction %: 0.00 Rows per Sort:

6 Lionel Frachon - SII Page 6 Partie 3 : Efficacité de linstance Instance Efficiency Percentages (Target 100%) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Buffer Nowait %: (> 90%) Redo NoWait %: (>98%) Buffer Hit %: (> 90%) In-memory Sort %: 99.41(>99%) Library Hit %: (> 95%) Soft Parse %: 62.78(>80%) Execute to Parse %: 0.23 (> 98%) Latch Hit %: 99.26(>99%) Parse CPU to Parse Elapsd %: (> 95%) % Non-Parse CPU: Shared Pool Statistics Begin End Memory Usage %: ( devrait etre stable) % SQL with executions>1: ( devrait etre proche de 100% si…) % Memory for SQL w/exec>1: ( )

7 Lionel Frachon - SII Page 7 Partie 4 : Top 5 des evenements générant de lactivité sur la base Top 5 Timed Events ~~~~~~~~~~~~~~~~~~ % Total Event Waits Time (s) Ela Time CPU time db file sequential read 26, library cache pin resmgr:waiting in end wait latch free 2,

8 Lionel Frachon - SII Page 8 Partie 5 : Événements dattente Wait Events for DB: SILODECL Instance: SILODECL Snaps: > s - second -> cs - centisecond - 100th of a second -> ms - millisecond th of a second -> us - microsecond th of a second -> ordered by wait time desc, waits desc (idle events last) Avg Total Wait wait Waits Event Waits Timeouts Time (s) (ms) /txn db file sequential read 26, ,371.1 library cache pin resmgr:waiting in end wait latch free 2, buffer busy waits resmgr:waiting in check control file parallel write resmgr:waiting in check SQL*Net more data to client 5, log file parallel write log file sync db file scattered read control file sequential read resmgr:wait in actses run direct path read direct path write SQL*Net message from client 18, , ,330.4 SQL*Net more data from clien SQL*Net message to client 18, , , On recherche ici les plus grosses attentes (waits & avg wait), ce sont celles qui handicapent le plus la base, car Oracle attend que ces événements soient passés afin de pouvoir enchaîner sur le traitement suivant.

9 Lionel Frachon - SII Page 9 Partie 6 : Événements dattente (background)

10 Lionel Frachon - SII Page 10 Partie 7 : Requetes les plus consommatrices (part 1) SQL ordered by Gets SQL ordered by Gets for DB: SILODECL Instance: SILODECL Snaps: > End Buffer Gets Threshold: > Note that resources reported for PL/SQL includes the resources used by all SQL statements called within the PL/SQL code. As individual SQL statements are also reported, it is possible and valid for the summed total % to exceed 100 CPU Elapsd Buffer Gets Executions Gets per Exec %Total Time (s) Time (s) Hash Value ,721, , Module: JDBC Thin Client select /*+ INDEX (DONNEE_TVA IX_DONNEE_TVA_03) INDEX (IMPRIME_TV A IX_IMPRIME_TVA_03) */ T.ID_DEPOT_TVA, T.siren, T.nic, T.numact, T.numseq, T.numero_ordre, T.sages2_recette, T.sages2_cdi, T.ty pe_declaration, to_char(T.dls,'DD/MM/YYYY') as dls, to_char(T.da te_depot,'DD/MM/YYYY') as date_depot, to_char(T.date_debut_perio 93, , Module: SQL*Plus begin :numero_snapshot := statspack.snap(i_snap_level=>7); end; Attention, 500 premiers caracteres, voir hashvalue

11 Lionel Frachon - SII Page 11 Partie 7 : Requetes les plus consommatrices (part 2) SQL ordered by Reads for DB: SILODECL Instance: SILODECL Snaps: > End Disk Reads Threshold: 1000 CPU Elapsd Physical Reads Executions Reads per Exec %Total Time (s) Time (s) Hash Value , Module: JDBC Thin Client select /*+ INDEX (DONNEE_TVA IX_DONNEE_TVA_03) INDEX (IMPRIME_TV A IX_IMPRIME_TVA_03) */ T.ID_DEPOT_TVA, T.siren, T.nic, T.numact, T.numseq, T.numero_ordre, T.sages2_recette, T.sages2_cdi, T.ty pe_declaration, to_char(T.dls,'DD/MM/YYYY') as dls, to_char(T.da te_depot,'DD/MM/YYYY') as date_depot, to_char(T.date_debut_perio 1, Module: SQL*Plus begin :numero_snapshot := statspack.snap(i_snap_level=>7); end;

12 Lionel Frachon - SII Page 12 Partie 7 : Requetes les plus consommatrices (part 3) SQL ordered by Executions SQL ordered by Executions for DB: SILODECL Instance: SILODECL Snaps: > End Executions Threshold: 100 CPU per Elap per Executions Rows Processed Rows per Exec Exec (s) Exec (s) Hash Value , Module: JDBC Thin Client select /*+ INDEX (DONNEE_TVA IX_DONNEE_TVA_03) INDEX (IMPRIME_TV A IX_IMPRIME_TVA_03) */ T.ID_DEPOT_TVA, T.siren, T.nic, T.numact, T.numseq, T.numero_ordre, T.sages2_recette, T.sages2_cdi, T.ty pe_declaration, to_char(T.dls,'DD/MM/YYYY') as dls, to_char(T.da te_depot,'DD/MM/YYYY') as date_depot, to_char(T.date_debut_perio

13 Lionel Frachon - SII Page 13 Partie 7 : Requetes les plus consommatrices (part 4) SQL ordered by Parse Calls SQL ordered by Parse Calls for DB: SILODECL Instance: SILODECL Snaps: > End Parse Calls Threshold: 1000 % Total Parse Calls Executions Parses Hash Value Module: JDBC Thin Client select /*+ INDEX (DONNEE_TVA IX_DONNEE_TVA_03) INDEX (IMPRIME_TV A IX_IMPRIME_TVA_03) */ T.ID_DEPOT_TVA, T.siren, T.nic, T.numact, T.numseq, T.numero_ordre, T.sages2_recette, T.sages2_cdi, T.ty pe_declaration, to_char(T.dls,'DD/MM/YYYY') as dls, to_char(T.da te_depot,'DD/MM/YYYY') as date_depot, to_char(T.date_debut_perio

14 Lionel Frachon - SII Page 14 Partie 8 : Activité de linstance Instance Activity Stats Instance Activity Stats for DB: SILODECL Instance: SILODECL Snaps: 5 -9 Statistic Total per Second per Trans active txn count during cleanout background timeouts 1, buffer is not pinned count 2,912,871 1, ,108.9 buffer is pinned count 2,101,500 1, ,687.5 bytes received via SQL*Net from c 7,057,529 4, ,191.1 bytes sent via SQL*Net to client 22,618,423 14, ,827,302.9 calls to get snapshot scn: kcmgss 1, […] commit cleanouts successfully com commit txn count during cleanout consistent changes consistent gets 7,147,193 4, ,399.1 CPU used by this session 17, ,134.0 CPU used when call started 17, ,134.0 […] transaction rollbacks Ici on peut détailler chaque action de la base, mais ceci ne sert qua confirmer le pré-diagnostic déjà établi, Explications completes sur Oracle9i Database Reference Release 2 (9.2)

15 Lionel Frachon - SII Page 15 Partie 8 : Activité de linstance Activité significative : Activité des buffers buffer is not pinned count 2,912,871 1, ,108.9=> buffers libres buffer is pinned count 2,101,500 1, ,687.5=> buffers occupés (=> déplacement des blocs en mémoire) no buffer to keep pinned count 2,805,800 1, ,725.0=> buffers alloués mais non disponibles no work - consistent read gets 2,469,792 1, ,724.0=> buffers ok (ni cleanout, ni rollback) Activité des I/O index fetch by key 296, ,021.3 => acces table index par clef (le + efficace) index scans kdiixs1 2,946,260 1, ,282.5 => acces par index fast full scan table fetch by rowid 1,182, ,845.3 => acces table via index : optimisé table fetch continued row 2, => multiples I/O pour acceder un bloc, du a un bloc trop grand ou chaîné table scan blocks gotten => besoin reel des select en blocs table scan rows gotten 2, => besoin reel des select en lignes table scans (long tables) => scans sur grandes tables table scans (short tables) => scans sur petites tables Tris sorts (disk) => tris disque sorts (memory) 2, => tris memoire sorts (rows) 1,003, ,459.0=> nb de lignes triées Autres transaction rollbacks

16 Lionel Frachon - SII Page 16 Partie 9 : Activité des I/O (plusieurs tris) File IO Stats for DB File IO Stats for DB : SILODECL Instance: SILODECL Snaps: >ordered by Tablespace, File Tablespace Filename Av Av Av Av Buffer Av Buf Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms) SILODECL_D06 /ADE-DECLA1-DATA/silodecl_d06.dbf SILODECL_D07 /ADE-DECLA1-DATA/silodecl_d07.dbf SILODECL_D08 /ADE-DECLA1-DATA/silodecl_d08.dbf SILODECL_D09 /ADE-DECLA1-DATA/silodecl_d09.dbf SILODECL_D10 /ADE-DECLA1-DATA/silodecl_d10.dbf […] SILODECL_D16 /ADE-DECLA1-DATA/silodecl_d16.dbf 3, SILODECL_D17 /ADE-DECLA1-DATA/silodecl_d17.dbf 2, SILODECL_I05 /ADE-DECLA1-INDEX/silodecl_i05.dbf SILODECL_I06 /ADE-DECLA1-INDEX/silodecl_i06.dbf On recherche ici les différences de traitement (I/O) entre les différents tablespaces plutôt que des valeurs optimales, ainsi que le « buffer wait » moyen qui donne une idée de lencombrement des I/O a partir du disque

17 Lionel Frachon - SII Page 17 Partie 10 : Buffer pool Buffer Pool Statistics Buffer Pool Statistics for DB: SILODECL Instance: SILODECL Snaps: > Standard block size Pools D: default, K: keep, R: recycle -> Default Pools for other block sizes: 2k, 4k, 8k, 16k, 32k Free Write Buffer Number of Cache Buffer Physical Physical Buffer Complete Busy P Buffers Hit % Gets Reads Writes Waits Waits Waits D 7, ,150,839 27, Cette statistique donne le ratio entre la recherche de blocs de données trouvés en cache sur le nombre total de blocs requis par lensemble des requêtes SQL. Un taux < à 95% indique que le buffer est trop petit, exceptionnellement que de multiples activités se passent simultanément sur la base (tres tres rare).

18 Lionel Frachon - SII Page 18 Partie 11 : Conseiller Buffer pool Buffer Pool Advisory -> Only rows with estimated physical reads >0 are displayed -> ordered by Block Size, Buffers For Estimate Size for Size Buffers for Est Physical Estimated P Estimate (M) Factr Estimate Read Factor Physical Reads D , ,993,287 D , ,959,843 D , ,942,127 D , ,923,121 D , ,914,350 D , ,897,016 D , ,877,294 D , ,858,941 D , ,848,817 D , ,830,846 D , ,827,869 D , ,822,871 D , ,817,586 D , ,810,837 D , ,800,825 D , ,792,006 D , ,780,609 D , ,759,884 D , ,745,256 D , ,715, Advisory = conseiller Cette partie simule une diminution /augmentation du buffer pool afin de vérifier le gain ou limpact de la taille mémoire buffer sur le nombre de lectures nécessaires Rappel : il existe les vue v$shared_pool_advice et v$buffer_pool_advice qui fournissent les mêmes données en temps réel.

19 Lionel Frachon - SII Page 19 Partie 12 : Attentes du Buffer Pool Buffer wait Statistics Buffer wait Statistics for DB: SILODECL Instance: SILODECL Snaps: > ordered by wait time desc, waits desc Tot Wait Avg Class Waits Time (s) Time (ms) data block undo header Attente majoritairement dûe aux blocs de données

20 Lionel Frachon - SII Page 20 Partie 13 : Rollbacks & undo Rollback Segment Stats : Inutilisé en 9i Remplacé par : Undo Segment Summary Undo Segment Summary for DB: SILODECL Instance: SILODECL Snaps: > Undo segment block stats: -> uS - unexpired Stolen, uR - unexpired Released, uU - unexpired reUsed -> eS - expired Stolen, eR - expired Released, eU - expired reUsed Undo Undo Num Max Qry Max Tx Snapshot Out of uS/uR/uU/ TS# Blocks Trans Len (s) Concurcy Too Old Space eS/eR/eU , /0/0/0/0/ Undo Segment Stats for DB: SILODECL Instance: SILODECL Snaps: > ordered by Time desc Undo Num Max Qry Max Tx Snap Out of uS/uR/uU/ End Time Blocks Trans Len (s) Concy Too Old Space eS/eR/eU Mar 15: , /0/0/0/0/0 16-Mar 15: , /0/0/0/0/0 16-Mar 15: , /0/0/0/0/


Télécharger ppt "Lionel Frachon - SII Page 1 Statspack Analyse des statistiques générées."

Présentations similaires


Annonces Google