{"id":8579,"date":"2016-07-16T20:24:19","date_gmt":"2016-07-16T18:24:19","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/"},"modified":"2016-07-16T20:24:19","modified_gmt":"2016-07-16T18:24:19","slug":"amm-and-asmm-derived-parameters","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/","title":{"rendered":"AMM and ASMM derived parameters"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nThe latest <a href=\"https:\/\/www.dbi-services.com\/trainings\/oracle-dba-essentials-workshop\/\" target=\"_blank\" rel=\"noopener noreferrer\">DBA Essentials Workshop<\/a> training I&#8217;ve given raised a question about PGA_AGGREGATE_LIMIT. The default depends on PGA_AGGREGATE_TARGET. So how is it calculated in AMM where PGA_AGGREGATE_TARGET is dynamic? Is it also dynamic or is it determined by the value at instance startup only?<br \/>\n<!--more--><br \/>\nThe PGA_AGGREGATE_LIMIT default value is <a href=\"https:\/\/docs.oracle.com\/database\/121\/REFRN\/GUID-E364D0E5-19F2-4081-B55E-131DF09CFDB3.htm#REFRN10328\" target=\"_blank\" rel=\"noopener noreferrer\">documented<\/a>. I&#8217;ll use the following query to display the values of the concerned parameters:<\/p>\n<pre><code>\nselect\ndbms_stats_internal.get_parameter_val('pga_aggregate_limit')\/1024\/1024\/1024 \"pga_aggregate_limit\",\n 2 \"2GB\",\n 3*dbms_stats_internal.get_parameter_val('processes')\/1024 \"3MB*processes\",\n 2*dbms_stats_internal.get_parameter_val('__pga_aggregate_target')\/1024\/1024\/1024 \"2*__pga_aggregate_target\",\n dbms_stats_internal.get_parameter_val('__sga_target')\/1024\/1024\/1024 \"__sga_target\",\n dbms_stats_internal.get_parameter_val('__pga_aggregate_target')\/1024\/1024\/1024 \"__pga_aggregate_target\"\nfrom dual\n\/\n<\/code><\/pre>\n<p>and I start with the following:<\/p>\n<pre><code>\npga_aggregate_limit        2GB 3MB*processes 2*__pga_aggregate_target __sga_target __pga_aggregate_target\n------------------- ---------- ------------- ------------------------ ------------ ----------------------\n            2.40625          2     .87890625                  2.40625     1.796875               1.203125\n<\/code><\/pre>\n<p>I&#8217;m in AMM with only MEMORY_TARGET set to 3G. The dynamic SGA is at 1.8G and the PGA at 1.2G. The PGA_AGGREGATE_LIMIT is at 200% of the PGA which is 2.4G<\/p>\n<p>I increase the SGA in order to see a resize of the PGA<\/p>\n<pre><code>\nSQL&gt; alter system set sga_target=2500M;\nSystem altered.\n<\/code><\/pre>\n<p>The PGA is now about 500M in order to release some space for SGA:<\/p>\n<pre><code>pga_aggregate_limit        2GB 3MB*processes 2*__pga_aggregate_target __sga_target __pga_aggregate_target\n------------------- ---------- ------------- ------------------------ ------------ ----------------------\n            2.40625          2     .87890625                  1.09375     1.796875                .546875\n<\/code><\/pre>\n<p>However, the PGA_AGGREGATE_LIMIT did no change. the formula is not dynamic. The value that has been calculated at startup remains.<\/p>\n<h3>spfile<\/h3>\n<p>When dynamic components are resized, the values are written into the spfile with double underscore parameters, so that a restart of the instance starts with same value:<\/p>\n<pre><code>SQL&gt; host strings \/u01\/app\/oracle\/product\/12.1.0\/dbhome_1\/dbs\/spfileCDB.ora     | grep target\nCDB.__pga_aggregate_target=587202560\nCDB.__sga_target=1929379840\n*.memory_max_target=5G\n*.memory_target=3G\n.sga_target=2634022912<\/code><\/pre>\n<p>So let&#8217;s restart and see what happens to PGA_AGGREGATE_LIMIT (which has no double underscore entry in spfile)<\/p>\n<pre><code>SQL&gt; startup force\nORACLE instance started.\n&nbsp;\nTotal System Global Area 5368709120 bytes\nFixed Size                  2935712 bytes\nVariable Size            3976201312 bytes\nDatabase Buffers          721420288 bytes\nRedo Buffers               13840384 bytes\nIn-Memory Area            654311424 bytes\nDatabase mounted.\nDatabase opened.\n&nbsp;\nSQL&gt; select\n  2   dbms_stats_internal.get_parameter_val('pga_aggregate_limit')\/1024\/1024\/1024 \"pga_aggregate_limit\",\n  3   2 \"2GB\",\n  4   3*dbms_stats_internal.get_parameter_val('processes')\/1024 \"3MB*processes\",\n  5   2*dbms_stats_internal.get_parameter_val('__pga_aggregate_target')\/1024\/1024\/1024 \"2*__pga_aggregate_target\",\n  6   dbms_stats_internal.get_parameter_val('__sga_target')\/1024\/1024\/1024 \"__sga_target\",\n  7   dbms_stats_internal.get_parameter_val('__pga_aggregate_target')\/1024\/1024\/1024 \"__pga_aggregate_target\"\n  8   from dual\n  9  \/\n&nbsp;\npga_aggregate_limit        2GB 3MB*processes 2*__pga_aggregate_target __sga_target __pga_aggregate_target\n------------------- ---------- ------------- ------------------------ ------------ ----------------------\n                  2          2     .87890625                  1.09375     2.453125                .546875\n<\/code><\/pre>\n<p>The good thing is that the value is calculated from the actual values. Here 200% of PGA is smaller than 2G so 2G is used.<\/p>\n<p>The bad thing is that a restart of the instance may bring a different behavior than before than restart.<\/p>\n<h3>So what?<\/h3>\n<p>This instability is easy to solve: don&#8217;t use AMM. SGA and PGA are different things and you should size them separately.<br \/>\nBut the problem is wider. There are other parameters that can show same behavior. For example, the default db_file_multiblock_read_count can be limited by processes x __db_block_buffers.<br \/>\nYou may have to change some values either manually or automatically at the start of a new application because you don&#8217;t know which is the best setting. But once the application is more stable, you should stabilize the dynamic sizing by setting minimum values.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . The latest DBA Essentials Workshop training I&#8217;ve given raised a question about PGA_AGGREGATE_LIMIT. The default depends on PGA_AGGREGATE_TARGET. So how is it calculated in AMM where PGA_AGGREGATE_TARGET is dynamic? Is it also dynamic or is it determined by the value at instance startup only?<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[241,881,96],"type_dbi":[],"class_list":["post-8579","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-amm","tag-asmm","tag-oracle"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>AMM and ASMM derived parameters - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AMM and ASMM derived parameters\" \/>\n<meta property=\"og:description\" content=\"By Franck Pachot . The latest DBA Essentials Workshop training I&#8217;ve given raised a question about PGA_AGGREGATE_LIMIT. The default depends on PGA_AGGREGATE_TARGET. So how is it calculated in AMM where PGA_AGGREGATE_TARGET is dynamic? Is it also dynamic or is it determined by the value at instance startup only?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-16T18:24:19+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"AMM and ASMM derived parameters\",\"datePublished\":\"2016-07-16T18:24:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/\"},\"wordCount\":362,\"commentCount\":0,\"keywords\":[\"AMM\",\"ASMM\",\"Oracle\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/\",\"name\":\"AMM and ASMM derived parameters - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2016-07-16T18:24:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AMM and ASMM derived parameters\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"AMM and ASMM derived parameters - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/","og_locale":"en_US","og_type":"article","og_title":"AMM and ASMM derived parameters","og_description":"By Franck Pachot . The latest DBA Essentials Workshop training I&#8217;ve given raised a question about PGA_AGGREGATE_LIMIT. The default depends on PGA_AGGREGATE_TARGET. So how is it calculated in AMM where PGA_AGGREGATE_TARGET is dynamic? Is it also dynamic or is it determined by the value at instance startup only?","og_url":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/","og_site_name":"dbi Blog","article_published_time":"2016-07-16T18:24:19+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"AMM and ASMM derived parameters","datePublished":"2016-07-16T18:24:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/"},"wordCount":362,"commentCount":0,"keywords":["AMM","ASMM","Oracle"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/","url":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/","name":"AMM and ASMM derived parameters - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2016-07-16T18:24:19+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/amm-and-asmm-derived-parameters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AMM and ASMM derived parameters"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/8579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=8579"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/8579\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=8579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=8579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=8579"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=8579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}