{"id":1504,"date":"2009-06-28T12:00:00","date_gmt":"2009-06-28T12:00:00","guid":{"rendered":"http:\/\/orcldoug.com\/blog\/?p=1504"},"modified":"2009-06-28T12:00:00","modified_gmt":"2009-06-28T12:00:00","slug":"i-love-addm","status":"publish","type":"post","link":"http:\/\/orcldoug.com\/blog\/2009\/06\/28\/i-love-addm\/","title":{"rendered":"I Love ADDM"},"content":{"rendered":"<p><em>Some features in this post require a Diagnostics Pack license.<\/em><\/p>\n<p>I&#8217;ll get back to adaptive thresholds at some point but something&#8217;s been bugging me.<\/p>\n<p>I&#8217;m not <em>just<\/em> trying to be controversial but I&#8217;ve a feeling I&#8217;m about to be, given that ADDM is the probably the most infamous of the 10g &#8216;Automatic Tuning&#8217; features. What should be the beautiful swan of those features has somehow become the unloved, barely-mentioned ugly duckling.<\/p>\n<p>One of my favourite running lines on a mailing list is that whenever a performance problem crops up, one of the participants will always say &#8216;So what did ADDM say in this case?&#8217; or something similar. It&#8217;s funny because ADDM is barely mentioned and people seem to need reminding that it exists or maybe they just don&#8217;t like it? I suspect it&#8217;s the latter. Maybe there are psychological factors at play here? Even the people who turn up at the courses I teach, who are obviously interested in the subject, or those good people at the good sites like the one I&#8217;ve working at at the moment all seemed focussed on AWR. ASH and ADDM don&#8217;t get much of a look in, 5 years after they were released. Maybe people like AWR because it&#8217;s so similar to Statspack and they&#8217;re used to Statspack?<\/p>\n<p>However, I keep coming across different examples where Automatic Database Diagnostic Monitor has identified what&#8217;s causing a performance problem. That&#8217;s not the same as fixing it, of course, but I&#8217;ve watched people flailing around making a variety of guesses, looking at ASH data or debating AWR reports before getting round to thinking &#8211; &#8216;Why don&#8217;t we just see what ADDM has to say. Just out of interest.&#8217; (The truth is I often prompt that thought &#128521;) This has happened many times in recent months and lo-and-behold, ADDM either formed the same correct conclusions in a fraction of the time people had been &#8216;analysing&#8217; things or found things that the initial analysis hadn&#8217;t.<\/p>\n<p>It stands to reason. If you think about how you analyse performance, don&#8217;t you find where sessions are spending their time and identify the causes? Don&#8217;t you see which SQL statements are running for long periods of time or are consuming most resources? Don&#8217;t you identify those segments which are most active? I could go on. The fact is that every sensible performance analysis method I&#8217;m personally aware of could be reduced to looking at where time is being spent and focussing on the most significant contributing factors. Which is all that ADDM does, too.<\/p>\n<p>In case I seem like some deluded fan-boy, let me highlight some of the things I don&#8217;t like about ADDM.<\/p>\n<p>1) I haven&#8217;t seen this problem for a while and I suspect it&#8217;s because of improvements on the earlier releases, but ADDM used to suggest frequently that CPU was not a bottleneck when it clearly was.<\/p>\n<p>2) What is it with it&#8217;s constant suggestions to increase memory areas? You could say maybe that&#8217;s because I&#8217;m configuring too little memory all the time, but I&#8217;ve talked to lots of people about this and worked on lot of systems and everyone I know experiences the same. Somewhere down the bottom of those recommendations it&#8217;ll tell you to increase SGA and PGA memory. So you do. So it asks again. So you do &#8230; I&#8217;ll save you weeks and months of tedium and just point out that this can go on for a very long time and in very small increments. Rare is the ADDM report that doesn&#8217;t suggest increasing some memory area or other.<\/p>\n<p>I don&#8217;t think that ADDM&#8217;s recommendations should be followed slavishly though. I&#8217;m much more interested in using it as a tool that will analyse where time is being spent and show me the big-hitters. I&#8217;ll always be interested in it&#8217;s advice, too, but I&#8217;d be extremely unlikely to click to implement any of it&#8217;s recommendations without some serious thought. I usually confirm what it&#8217;s telling me through my own experience and ASH and AWR data. In fact, one of my favourite games when I have the time is to leave the ADDM analysis until after I&#8217;ve analysed the problem myself. Believe me, my ego is big enough to cope with the large percentage of times that ADDM ends up reporting what it took me 30-100 times as long to work out &#128521; (If that makes me sound slow, remember that ADDM has already done the job and maybe took a minute)<\/p>\n<p>For example, at work last week there were some serious performance problems with the overnight batch. Unfortunately we didn&#8217;t find out about them until the next day so we needed tools suited to analysing problems in the past. There are quite a few options, most of which I had no access to, so I requested the privileges and that the DBAs run some reports for me while I was waiting. I found myself looking at ASH reports and comparing AWR reports for nights where performance was acceptable and unacceptable. I could identify a couple of things in the AWR reports &#8211; the auto stats gather job seemed to be running during the second night and the single block read time averages were double what they usually are. But it took a little while to spot these anomalies because the reports looked very similar even though they were for identical time periods but completely different workload (maybe more on that another time, just to prove I understand that all tools have some weakness or other). Eventually the privileges came through and I was able to look at the ADDM runs for the periods covering the batch schedule. ADDM spotted the same couple of issues in a fraction of the time and picked out a few SQL statements that I could focus on, one of which was part of a new release. <\/p>\n<p>OK, so then some serious tuning started, but if I&#8217;d used ADDM in the first place, there was probably an hour or two that I could have used for tuning instead of analysing. Of course, it often highlights a bunch of SQL statements to focus on, so how has that helped me with solving the problem? Let me turn that around. How often <em>is<\/em> a performance problem down to a few SQL statements that need tuning? Even in the case of the application I&#8217;m working on at the moment, where the design is all wrong, what I&#8217;m really interested in is the impact of that design on system performance. ADDM won&#8217;t help me redesign it, but I can assure you that it&#8217;s highlighting the negative impact of the original design decisions.<\/p>\n<p>What really gets me about this is that you&#8217;re paying the overhead anyway and if you have Diagnostics Pack licences (which I&#8217;m finding more people do these days) why on earth would you choose to ignore further confirmation of your own analysis, if nothing else. Is there something about using ADDM&#8217;s analysis which somehow undermines our performance egos? LOL<\/p>\n<p>If you&#8217;re in the 10g\/Diagnostics situation, just do me a favour and at least just look at the relevant ADDM runs when you&#8217;ve experienced a performance problem in the past. It&#8217;s not hard and, with my restricted privileges and limited server access at my current site, it comes down to this. (You don&#8217;t even need Grid or DB Control.)<\/p>\n<p>1) Get the ADVISOR privilege.<\/p>\n<p>2) Look in DBA_ADVISOR_TASKS and the ADDM runs will be there. The work&#8217;s already been done.<\/p>\n<pre>select task_name, execution_end \nfrom dba_advisor_tasks \nwhere advisor_name='ADDM' \nand status='COMPLETED' \nand owner='SYS' \norder by execution_end desc;<\/pre>\n<p>3) View the report.<\/p>\n<pre>select DBMS_ADVISOR.GET_TASK_REPORT('<em>&lt;task_name from previous query&gt;<\/em>', 'TEXT', \n\t'TYPICAL', 'ALL', 'SYS') \nfrom dual;<\/pre>\n<p>If the recommendations turn out to be complete rubbish then I promise I&#8217;ll be very keen to hear about that. If not, then maybe people will start taking ADDM a little more seriously and look at it on it&#8217;s merits without starting off from the biased view-point that an Oracle tool couldn&#8217;t possibly be as good at this stuff as you are &#128521;<\/p>\n<p>Really, if you&#8217;re paying for it, why aren&#8217;t you looking at it?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some features in this post require a Diagnostics Pack license. I&#8217;ll get back to adaptive thresholds at some point but something&#8217;s been bugging me. I&#8217;m not just trying to be controversial but I&#8217;ve a feeling I&#8217;m about to be, given that ADDM is the probably the most infamous of the 10g &#8216;Automatic Tuning&#8217; features. What&hellip; <a class=\"more-link\" href=\"http:\/\/orcldoug.com\/blog\/2009\/06\/28\/i-love-addm\/\">Continue reading <span class=\"screen-reader-text\">I Love ADDM<\/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-1504","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1382,"url":"http:\/\/orcldoug.com\/blog\/2008\/02\/22\/how-useful-are-diagnosticoptimization-tools-another-view\/","url_meta":{"origin":1504,"position":0},"title":"&#8220;How useful are diagnostic\/optimization tools?&#8221; &#8211; Another View","date":"February 22, 2008","format":false,"excerpt":"There have been a couple of very interesting blog postings over the past few weeks from Daniel Fink and Alex Gorbachev, prompted by a panel discussion at last week's RMOUG conference. Well, I suspect the panel was prompted by an earlier blog posting and many late night conversations. I've just\u2026","rel":"","context":"With 25 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1432,"url":"http:\/\/orcldoug.com\/blog\/2008\/09\/01\/time-matters-db-cpu\/","url_meta":{"origin":1504,"position":1},"title":"Time Matters &#8211; DB CPU","date":"September 1, 2008","format":false,"excerpt":"In his comment on the last post, John Beresniewicz mentioned the following property of DB CPU :-\"... 'DB time' fully contains 'DB CPU' and both are measured values (which means in particular that 'DB CPU' is not inflated by runq time)\"I'd like to talk about the end of that sentence\u2026","rel":"","context":"With 24 comments","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/18.133.199.212\/wp-content\/uploads\/recovered\/DBCPU4.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1429,"url":"http:\/\/orcldoug.com\/blog\/2008\/08\/20\/time-matters-db-time\/","url_meta":{"origin":1504,"position":2},"title":"Time Matters &#8211; DB Time","date":"August 20, 2008","format":false,"excerpt":"[In retrospect, the title of that first blog post might have suited the subject, but doesn't translate too well for subsequent related blog posts. That was a lack of planning or foresight on my part. These blog posts are tumbling out of my head in a fairly incoherent way. Maybe\u2026","rel":"","context":"With 13 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":1504,"position":3},"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":[]},{"id":1289,"url":"http:\/\/orcldoug.com\/blog\/2007\/07\/04\/awr-licensing\/","url_meta":{"origin":1504,"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":1421,"url":"http:\/\/orcldoug.com\/blog\/2008\/06\/23\/northern-server-technology-day\/","url_meta":{"origin":1504,"position":5},"title":"Northern Server Technology Day","date":"June 23, 2008","format":false,"excerpt":"Last Thursday's Northern Server Technology Day organised by the UKOUG was one of the more enjoyable events I've attended. It helped that there were no hotels, driving or airports involved, just a simple walk to the train station, a 90 minute train journey (free wireless on hand) and a 10\u2026","rel":"","context":"With 2 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1504","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=1504"}],"version-history":[{"count":0,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1504\/revisions"}],"wp:attachment":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/media?parent=1504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/categories?post=1504"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/tags?post=1504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}