An overview of AWR, ASH and ADDM
Learning About AWR Real-World Performance Day with Tom Kyte The Independent Oracle Users Groups presents “A Day of Real-World Performance” featuring Tom Kyte; coming to a city near you. Tom, author of the popular AskTom Blog, will be joined at this unique performance master class by Andrew Holdsworth, head of Oracle’s Real World Performance group Graham Wood, performance architect at Oracle and the father of ASH and AWR
Learning AWR - UTOUG Performance Diagnosis with Custom ASH and AWR Reporting - Daniel Fink RDBMS Forensics using ASH and AWR - Tim Gorman
Thanks For Coming Questions?
AWR – Automatic Work Repository Enhanced STATSPACK Reports can be generated from sqlplus or browers Data is stored from various performance views including V$SYSSTAT, V$SESSTAT and V$ACTIVE_SESSION_HISTORY Data from AWR is used by Undo, Segment, advisors and ADDM New features are added in major and even minor version changes
Populating The AWR ASH – Active Session History Circular area of SGA memory that holds session wait information MMON – New 10g background process that stores the ASH information in the AWR AWR and ADDM talk with your Sales Rep about AWR license!
ASH - Performance Graph
ASH – Find Performance Problems
Sql Drill Down
Configuring AWR Snapshots 11.2 Default is snap every hour and retain for 7 days Use either OEM or DBMS_WORKLOAD_REPOSITORY to change BEGIN DBMS_WORKLOAD_REPOSITORY.modify_snapshot_settings( retention => 43200, interval => 30) END; Change to 30 minute snaps and keep for 30 days Ensure you have enough space for the SYSAUX tablespace to store all the data! STATISTICS_LEVEL should be set to typical or all
Access AWR via OEM
Configuring AWR Snapshots STATISTICS_LEVEL should be set to typical or all or some stats could be missing Setting the interval to zero turns of snapshot collection View current snapshot settings in OEM or DBA_HIST_WR_CONTROL view
Manual AWR Snapshot Need create a snap shot now EXEC DBMS_WORKLOAD_REPOSITORY.create_snapshot; BEGIN DBMS_WORKLOAD_REPOSITORY.drop_snapshot_range ( low_snap_id => 22, high_snap_id => 32); END; /
AWR Baselines 11g Two snapshots that by default are retain forever that allows for performance comparison against another baseline. 3 Major types of baselines – Fixed, Moving Window, Templates
AWR Fixed Baseline Found in 10g but more flexible in 11g Use dates or snap ids for start and end periods Can automatically retire baselines DBMS_WORKLOAD_REPOSITORY.create_baseline( start_snap_id => 2490, end_snap_id => 2491, baseline_name => 'test1_bl', expiration => 60); DBMS_WORKLOAD_REPOSITORY.create_baseline( start_time => TO_DATE('09-JUL :00', 'DD-MON-YYYY HH24:MI'), end_time => TO_DATE('09-JUL :00', 'DD-MON-YYYY HH24:MI'), baseline_name => 'test2_bl', expiration => NULL);
AWR Moving Window Baselines The last X number of days from today is the start and end of the baseline If you want a baseline that is longer then the retention increase your retention! SQL> SELECT moving_window_size 2 FROM dba_hist_baseline 3 WHERE baseline_type = 'MOVING_WINDOW'; MOVING_WINDOW_SIZE SQL> BEGIN DBMS_WORKLOAD_REPOSITORY.modify_snapshot_settings( retention => 43200); -- Minutes (= 30 Days). END; / BEGIN DBMS_WORKLOAD_REPOSITORY.modify_baseline_window_size( window_size => 20); END; /
AWR Template Baselines Allows for creating baselines in the future Can be a one time creation or a repeating baseline BEGIN DBMS_WORKLOAD_REPOSITORY.create_baseline_template( start_time => TO_DATE('01-DEC :00', 'DD-MON-YYYY HH24:MI'), end_time => TO_DATE('01-DEC :00', 'DD-MON-YYYY HH24:MI'), baseline_name => '01_dec_010_00_05_bl', template_name => '01_dec_010_00_05_tp', expiration => 100); END; /
AWR Template Baselines BEGIN DBMS_WORKLOAD_REPOSITORY.create_baseline_template( day_of_week => 'MONDAY', -- Or ALL for everyday hour_in_day => 0, duration => 5, start_time => SYSDATE, end_time => ADD_MONTHS(SYSDATE, 6), baseline_name_prefix => 'monday_morning_bl_', template_name => 'monday_morning_tp', expiration => NULL); END; / BEGIN DBMS_WORKLOAD_REPOSITORY.drop_baseline_template (template_name => '01_dec_008_00_05_tp'); END; /
Using Baselines For Alerting Different time of day may call for different warning and critical thresholds During the day system is OLTP. Lots of quick queries and low response times At night batch processes run causing large I/O waits Use moving system window to set the thresholds so alerts are meaningful
ADDM Automatic diagnostic manager that uses AWR to find performance problems Analysis runs every time a AWR snapshot is taken Must have stats set to typical or all The results are stored in the AWR Results may include hardware, database, schema and application changes For I/O analysis ADDM needs to know how fast the storage is EXECUTE DBMS_ADVISOR.set_default_task_parameter('ADDM', 'DBIO_EXPECTED', 8000); FINDING 1: 59% impact (944 seconds) The buffer cache was undersized causing significant additional read I/O. RECOMMENDATION 1: DB Configuration, 59% benefit (944 seconds) ACTION: Increase SGA target size by increasing the value of parameter "sga_target" by 28 M. SYMPTOMS THAT LED TO THE FINDING: Wait class "User I/O" was consuming significant database time. (83% impact [1336 seconds])
Running ADDM Report From Sql Plus rdbms/admin/addmrpt.sql From OEM
Drill Down
Running AWR Report From OEM
Running AWR Report via
Real AWR Power, Compare Two Baselines Use the system moving window or a saved baseline to compare bad performance to a known good performance period
Comparing AWR Reports
Summary Upgrade to 11g! Ensure you have enough SYSAUX tablespace for retention period Stats are set to typical or all Look at the system moving window Dynamic Thresholds Save baselines for at know good performance periods Use AWR Compare
Thanks For Coming Questions?