{"id":1713,"date":"2014-07-07T12:00:00","date_gmt":"2014-07-07T12:00:00","guid":{"rendered":"http:\/\/orcldoug.com\/blog\/?p=1713"},"modified":"2014-07-07T12:00:00","modified_gmt":"2014-07-07T12:00:00","slug":"recurring-conversations-awr-intervals-part-1","status":"publish","type":"post","link":"http:\/\/orcldoug.com\/blog\/2014\/07\/07\/recurring-conversations-awr-intervals-part-1\/","title":{"rendered":"Recurring Conversations: AWR Intervals (Part 1)"},"content":{"rendered":"<p>I&#8217;ve seen plenty of blog posts and discussions over the years about the need to increase the default AWR retention period beyond the default value of 8 days. Experienced Oracle folk understand how useful it is to have a longer history of performance metrics to cover an entire workload period so that we can, for example, compare the acceptable performance of the last month end batch processes to the living hell of the current month end. You&#8217;ll often hear a suggested minimum of 35-42 days and I could make good arguments for even more history for trending and capacity management.<\/p>\n<p>That subject has been covered well enough, in my opinion. (To pick one example, <a href=\"http:\/\/18.133.199.212\/?p=1553\">this post<\/a> and it&#8217;s comments are around 5 years old.)\u00a0 Diagnostics Pack customers should almost always increase the default AWR retention period for important systems, even allowing for any additional space required in the SYSAUX tablespace.<\/p>\n<p>However, I&#8217;ve found myself talking about the best default AWR snapshot *interval* several times over recent months and years and realising that I&#8217;m slightly out of step with the prevailing wisdom on the subject, so let&#8217;s talk about intervals.<\/p>\n<p>I&#8217;ll kick off by saying that I think people should stick to the default 1 hour interval, rather than the 15 or 30 minute intervals that most of my peers seem to want. Let me explain why.<\/p>\n<p>Initially I was influenced by some of the performance guys working in Oracle and I remember being surprised by their insistence that one hour is a good interval, which is why they picked it. Hold on, though &#8211; doesn&#8217;t everyone know that a 1 hour AWR report smoothes out detail too much? <\/p>\n<p>Then I got into some discussions about <a href=\"http:\/\/18.133.199.212\/?p=1496\">Adaptive Thresholds<\/a> and it started to make more sense. If you want to compare performance metrics over time and trigger alerts automatically based on apparently unusual performance events or workload profiles, then comparing specific hours today to specific hours a month ago makes more sense than getting down to 15 minute intervals which would be far too sensitive to subtle changes. Adaptive Thresholds would become barking mad if the interval granularity was too fine. But when nobody used Adaptive Thresholds too much even though they seemed like a good idea (sorry JB &#128521;) this argument started to make less sense to me.<\/p>\n<p>However, I still think that there are very solid reasons to stick to 1 hour and they make more sense when you understand all of the metrics and analysis tools at your disposal and treat them as a box of tools appropriate to different problems.<\/p>\n<p>Let&#8217;s go back to why people think that a 1 hour interval is too long. The problem with AWR, Statspack and bstat\/estat is that they are system-wide reporting tools that capture the difference (or deltas) between the values of various metrics over a given interval. There are at least a couple of problems with that that come to mind.<\/p>\n<p>1) Although a bit of a simplification, almost all of the metrics are system-wide which makes them a poor data source for analysing an individual users performance experience or an individual batch job because systems generally have a mixture of different activities running concurrently. (Benchmarks and load tests are notable exceptions.)<\/p>\n<p>2) Problem 1 becomes worse when you are looking at *all* of the activity that occurred over a given period of time (the AWR Interval), condensed into a single data set or report. The longer the AWR period you report on, the more useless the data becomes. What use is an AWR report covering a one week period? So much has happened during that time and we might only be interested in what was happening at 2:13 am this morning.<\/p>\n<p>In other words, AWR reports combine a wide activity scope (everything on the system) with a wide time scope (hours or days if generated without thought). Intelligent performance folks reduce the impact of the latter problem by narrowing the time scope and reducing the snapshot interval so that if a problem has just happened or is happening right now, they can focus on the right 15 minutes of activity<sup>1<\/sup>.<\/p>\n<p>Which makes complete sense in the Statspack world they grew up in, but makes a lot less sense since Oracle 10g was released in 2004! These days there are probably better tools for what you&#8217;re trying to achieve.<\/p>\n<p>But, as this post is already getting pretty long, I&#8217;ll leave that for Part 2.<\/p>\n<p><sup>1<\/sup>The natural endpoint to this narrowing of time scope is when people use tools like Swingbench for load testing and select the option to generate AWR snapshots immediately before and after the test they&#8217;re running. Any AWR report of that interval will only contain the relevant information if the test is the only thing running on the system. At last year&#8217;s Openworld, <a href=\"https:\/\/twitter.com\/OracleGraham\">Graham Wood<\/a> and I also covered the narrowing of the Activity scope by, for example, running the AWR SQL report (awrrpt.sql) to limit the report to a single SQL statement of interest. It&#8217;s easy for people to forget &#8211; it&#8217;s a *suite* of tools and worth knowing the full range so that you pick the appropriate one for the problem at hand.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve seen plenty of blog posts and discussions over the years about the need to increase the default AWR retention period beyond the default value of 8 days. Experienced Oracle folk understand how useful it is to have a longer history of performance metrics to cover an entire workload period so that we can, for&hellip; <a class=\"more-link\" href=\"http:\/\/orcldoug.com\/blog\/2014\/07\/07\/recurring-conversations-awr-intervals-part-1\/\">Continue reading <span class=\"screen-reader-text\">Recurring Conversations: AWR Intervals (Part 1)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1713","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1719,"url":"http:\/\/orcldoug.com\/blog\/2014\/07\/24\/recurring-conversations-awr-intervals-part-2\/","url_meta":{"origin":1713,"position":0},"title":"Recurring Conversations: AWR Intervals (Part 2)","date":"July 24, 2014","format":false,"excerpt":"(Reminder, just in case we still need it, that the use of features in this post require Diagnostics Pack license.) Damn me for taking so long to write blog posts these days. By the time I get around to them, certain very knowledgeable people have commented on part 1 and\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1553,"url":"http:\/\/orcldoug.com\/blog\/2009\/12\/13\/my-favourite-oracle-blog\/","url_meta":{"origin":1713,"position":1},"title":"My Favourite Oracle Blog","date":"December 13, 2009","format":false,"excerpt":"Some features in this post require a Diagnostics Pack license.I think there a quite a few decent Oracle blogs around. There are links to some of them over there on the right. But by far my favourite this year has been Kerry Osborne's. I think there are a number of\u2026","rel":"","context":"With 9 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1403,"url":"http:\/\/orcldoug.com\/blog\/2008\/04\/17\/moving-awr-data\/","url_meta":{"origin":1713,"position":2},"title":"Moving AWR data","date":"April 17, 2008","format":false,"excerpt":"Note - features in this post require the Diagnostics Pack license[I originally had the first section at the end of the blog post, but then realised I might as well get the bad news out of the way to save you wasting your time if you're not interested]A small section\u2026","rel":"","context":"With 4 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1513,"url":"http:\/\/orcldoug.com\/blog\/2009\/07\/30\/awr-differences-report\/","url_meta":{"origin":1713,"position":3},"title":"AWR Differences Report","date":"July 30, 2009","format":false,"excerpt":"Some features in this post require a Diagnostics Pack license.This morning I had an opportunity to use one of my favourite AWR tools, the differences report. Our system has a fairly involved overnight batch schedule consisting of multiple concurrent job streams that starts at 02:00 and usually completes at about\u2026","rel":"","context":"With 12 comments","img":{"alt_text":"","src":"\/serendipity\/uploads\/awrdd2.png","width":350,"height":200},"classes":[]},{"id":1289,"url":"http:\/\/orcldoug.com\/blog\/2007\/07\/04\/awr-licensing\/","url_meta":{"origin":1713,"position":4},"title":"AWR Licensing","date":"July 4, 2007","format":false,"excerpt":"I thought I'd wait for a few days to see how the open letter to Larry Ellison on the subject of AWR licencing panned out.I love AWR, ASH and I even have an increasing, slightly grudging and cynical respect for ADDM. In fact, I'm in the course of putting together\u2026","rel":"","context":"With 15 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1395,"url":"http:\/\/orcldoug.com\/blog\/2008\/03\/25\/ash-and-the-psychology-of-hidden-parameters\/","url_meta":{"origin":1713,"position":5},"title":"ASH and the psychology of Hidden Parameters","date":"March 25, 2008","format":false,"excerpt":"Time for a quick break from the final push to complete the course slides. I've (probably foolishly) decided to apply the 10.2.0.4 patch to my test database.As I was confirming the details of when Oracle starts to flush information from the ASH Buffer to the workload repository, I thought I'd\u2026","rel":"","context":"With 5 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/comments?post=1713"}],"version-history":[{"count":0,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1713\/revisions"}],"wp:attachment":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/media?parent=1713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/categories?post=1713"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/tags?post=1713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}