{"id":5070,"date":"2015-07-13T19:37:07","date_gmt":"2015-07-13T17:37:07","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/"},"modified":"2015-07-13T19:37:07","modified_gmt":"2015-07-13T17:37:07","slug":"dont-use-the-default-database-file-autogrow-settings","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/","title":{"rendered":"Don&#8217;t use the default database file autogrow settings !"},"content":{"rendered":"<p>I often noticed default values for database file autogrow settings during my audits. You don&#8217;t trust me? Let me talk about a funny story about an incredible (and extreme) situation that concerns a transaction log file and its default settings.<\/p>\n<p>First of all, during my intervention, my customer complained of some performance issues, so I decided to take a look at different areas of its instance.<\/p>\n<p>I found some interesting records inside the SQL Server error log file as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg\" alt=\"blog_56_-_2_-_timeout_latch_log_manager_2_dump\" width=\"618\" height=\"287\" \/><\/p>\n<p>A timeout that occurred while waiting for latch class LOG_MANAGER \u2026 Ouch, it was the first time I faced this issue and after taking a look at the latch stats it confirmed that an issue existed on this area:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_3_-_latch_stats.jpg\" alt=\"blog_56_-_3_-_latch_stats\" width=\"396\" height=\"42\" \/><\/p>\n<p>Unfortunately, the Microsoft documentation is very poor concerning the description of this latch type.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_4_-_LOG_MANAGER_desc.jpg\" alt=\"blog_56_-_4_-_LOG_MANAGER_desc\" width=\"357\" height=\"34\" \/><\/p>\n<p>But <a href=\"https:\/\/twitter.com\/PaulRandal\">Paul Randal<\/a> gives some clues on his very useful blog <a href=\"http:\/\/www.sqlskills.com\/blogs\/paul\/most-common-latch-classes-and-what-they-mean\/\">here<\/a>. This latch may appear when transaction log file is growing (whatever the reason). After some investigations, I effectively found that the growing issue was due to an incorrect recovery model configuration (FULL and no backup log in this context).<\/p>\n<p>But that\u2019s not all and this is where the funny part of this story comes. To be honest, I have never seen a latch timeout causing by a growing of a transaction log file except on this situation. I first suspected the storage here but in fact after taking a look at the transaction log file size and the associated growth parameter, I definitely rule out this suspicion (at least the real problem was not here).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_5_-_log_space_used.jpg\" alt=\"blog_56_-_5_-_log_space_used\" width=\"391\" height=\"122\" \/><\/p>\n<p>&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_6_-_database_file_options.jpg\" alt=\"blog_56_-_6_-_database_file_options\" width=\"629\" height=\"34\" \/><\/p>\n<p><span style=\"font-size: 11pt;line-height: 107%;font-family: 'Calibri',sans-serif\">I replaced the real database name of my customer by <strong><em>User DB<\/em><\/strong> here. So what do you notice? No you don\u2019t dream \u2026 the transaction log file size = 1.2 TB with a default auto growth configuration = 10%! So I imagine that you begin to understand where the problem is located<\/span> \ud83d\ude42<\/p>\n<p>So, just for curiosity let\u2019s have a look at the generated dump file:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_7_-_dump_reading.jpg\" alt=\"blog_56_-_7_-_dump_reading\" width=\"506\" height=\"392\" \/><\/p>\n<p>So, it seems that an update query has generated log records after updating a BTree structure (<em>sqlmin!BTreeRow:UpdateRecord())<\/em>. In turn, the log manager tried to expand the transaction log file (<em>sqlmin!SQLServerLogMgr::GrowAFile()<\/em> method) without success after SQL Server has generated log records (<em>sqlmin!XdesRMReadWrite::LogBeginXact()<\/em> &#8211;&gt; <em>sqlmin!XdesRMReadWrite:GenerateLogRec()<\/em> methods) . In this context, I guess that the expand operation has taken a very long time because 10% of the transaction log file represents a large chunk of disk space (roughly 100GB).<\/p>\n<p>Finally let&#8217;s have a look at the wait stats:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_1_-_wait_stats.jpg\" alt=\"blog_56_-_1_-_wait_stats\" width=\"626\" height=\"136\" \/><\/p>\n<p>We can also correlate the PREEMPTIVE_OS_WRITEFILEGATHER wait type to our issue here with the high average value. Zeroing the new portion of the transaction log file may be very long in our context.<\/p>\n<p>My intention was not to blame my customer here but it was a good opportunity to point out the potential issue you may face with default database file auto growth settings!<\/p>\n<p>See you<\/p>\n<p>By David Barbarin<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I often noticed default values for database file autogrow settings during my audits. You don&#8217;t trust me? Let me talk about a funny story about an incredible (and extreme) situation that concerns a transaction log file and its default settings. First of all, during my intervention, my customer complained of some performance issues, so I [&hellip;]<\/p>\n","protected":false},"author":26,"featured_media":5071,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[595,280,67,51],"type_dbi":[],"class_list":["post-5070","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-integration-middleware","tag-autogrow","tag-database","tag-performance","tag-sql-server"],"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>Don&#039;t use the default database file autogrow settings ! - dbi Blog<\/title>\n<meta name=\"description\" content=\"Don&#039;t use the default database file autogrow settings !\" \/>\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\/dont-use-the-default-database-file-autogrow-settings\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Don&#039;t use the default database file autogrow settings !\" \/>\n<meta property=\"og:description\" content=\"Don&#039;t use the default database file autogrow settings !\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-13T17:37:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"784\" \/>\n\t<meta property=\"og:image:height\" content=\"365\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Microsoft 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=\"Microsoft Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 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\/dont-use-the-default-database-file-autogrow-settings\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/\"},\"author\":{\"name\":\"Microsoft Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\"},\"headline\":\"Don&#8217;t use the default database file autogrow settings !\",\"datePublished\":\"2015-07-13T17:37:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/\"},\"wordCount\":498,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg\",\"keywords\":[\"autogrow\",\"database\",\"Performance\",\"SQL Server\"],\"articleSection\":[\"Application integration &amp; Middleware\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/\",\"name\":\"Don't use the default database file autogrow settings ! - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg\",\"datePublished\":\"2015-07-13T17:37:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\"},\"description\":\"Don't use the default database file autogrow settings !\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg\",\"width\":784,\"height\":365},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Don&#8217;t use the default database file autogrow settings !\"}]},{\"@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\/bfab48333280d616e1170e7369df90a4\",\"name\":\"Microsoft Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"caption\":\"Microsoft Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Don't use the default database file autogrow settings ! - dbi Blog","description":"Don't use the default database file autogrow settings !","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\/dont-use-the-default-database-file-autogrow-settings\/","og_locale":"en_US","og_type":"article","og_title":"Don't use the default database file autogrow settings !","og_description":"Don't use the default database file autogrow settings !","og_url":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/","og_site_name":"dbi Blog","article_published_time":"2015-07-13T17:37:07+00:00","og_image":[{"width":784,"height":365,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg","type":"image\/jpeg"}],"author":"Microsoft Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Microsoft Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/"},"author":{"name":"Microsoft Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"headline":"Don&#8217;t use the default database file autogrow settings !","datePublished":"2015-07-13T17:37:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/"},"wordCount":498,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg","keywords":["autogrow","database","Performance","SQL Server"],"articleSection":["Application integration &amp; Middleware"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/","url":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/","name":"Don't use the default database file autogrow settings ! - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg","datePublished":"2015-07-13T17:37:07+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"description":"Don't use the default database file autogrow settings !","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog_56_-_2_-_timeout_latch_log_manager_2_dump.jpg","width":784,"height":365},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/dont-use-the-default-database-file-autogrow-settings\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Don&#8217;t use the default database file autogrow settings !"}]},{"@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\/bfab48333280d616e1170e7369df90a4","name":"Microsoft Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","caption":"Microsoft Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/5070","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\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=5070"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/5070\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/5071"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=5070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=5070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=5070"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=5070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}