{"id":512,"date":"2012-02-07T13:26:00","date_gmt":"2012-02-07T13:26:00","guid":{"rendered":"\/blogs\/paul\/post\/Survey-memory-configuration.aspx"},"modified":"2012-02-07T13:26:00","modified_gmt":"2012-02-07T13:26:00","slug":"survey-memory-configuration","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/","title":{"rendered":"Survey: memory configuration"},"content":{"rendered":"<p>\n<font face=\"verdana,geneva\" size=\"2\">Time for another survey &#8211; this time around memory configuration.<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">Here is some code to run if you&#39;re on SQL Server 2008 and 2008 R2 (thanks Jonathan!):<\/font>\n<\/p>\n<blockquote>\n<p>\n\t<font face=\"courier new,courier\" size=\"2\">SELECT<br \/>\n\t&nbsp;&nbsp;&nbsp; [physical_memory_in_bytes] AS [PhysMemBytes],<br \/>\n\t&nbsp;&nbsp;&nbsp; [physical_memory_in_use_kb] AS [PhysMemInUseKB],<br \/>\n\t&nbsp;&nbsp;&nbsp; [available_physical_memory_kb] AS [PhysMemAvailKB],<br \/>\n\t&nbsp;&nbsp;&nbsp; [locked_page_allocations_kb] AS [LPAllocKB],<br \/>\n\t&nbsp;&nbsp;&nbsp; [max_server_memory] AS [MaxSvrMem],<br \/>\n\t&nbsp;&nbsp;&nbsp; [min_server_memory] AS [MinSvrMem]<br \/>\n\tFROM<br \/>\n\t&nbsp;&nbsp;&nbsp; sys.dm_os_sys_info<br \/>\n\tCROSS JOIN<br \/>\n\t&nbsp;&nbsp;&nbsp; sys.dm_os_process_memory<br \/>\n\tCROSS JOIN<br \/>\n\t&nbsp;&nbsp;&nbsp; sys.dm_os_sys_memory<br \/>\n\tCROSS JOIN (<br \/>\n\t&nbsp;&nbsp;&nbsp; SELECT<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [value_in_use] AS [max_server_memory]<br \/>\n\t&nbsp;&nbsp;&nbsp; FROM<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.configurations<br \/>\n\t&nbsp;&nbsp;&nbsp; WHERE<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [name] = &#39;max server memory (MB)&#39;) AS c<br \/>\n\tCROSS JOIN (<br \/>\n\t&nbsp;&nbsp;&nbsp; SELECT<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [value_in_use] AS [min_server_memory]<br \/>\n\t&nbsp;&nbsp;&nbsp; FROM<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.configurations<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;WHERE<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [name] = &#39;min server memory (MB)&#39;) AS c2<\/font>\n\t<\/p>\n<\/blockquote>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">On 2012, the code is (thanks Bob!):<\/font>\n<\/p>\n<blockquote>\n<p>\n\t<font face=\"courier new,courier\" size=\"2\">SELECT<\/font><font face=\"courier new,courier\" size=\"2\"><br \/>\n\t&nbsp;&nbsp;&nbsp; [physical_memory_kb] AS [PhysMemKB],<br \/>\n\t&nbsp;&nbsp;&nbsp; [physical_memory_in_use] AS [PhysMemInUseKB],<br \/>\n\t&nbsp;&nbsp;&nbsp; [available_physical_memory_kb] AS [PhysMemAvailKB],<br \/>\n\t&nbsp;&nbsp;&nbsp; [locked_page_allocations_kb] AS [LPAllocKB],<br \/>\n\t&nbsp;&nbsp;&nbsp; [max_server_memory] AS [MaxSvrMem],<br \/>\n\t&nbsp;&nbsp;&nbsp; [min_server_memory] AS [MinSvrMem]<br \/>\n\tFROM<br \/>\n\t&nbsp;&nbsp;&nbsp; sys.dm_os_sys_info<br \/>\n\tCROSS JOIN<br \/>\n\t&nbsp;&nbsp;&nbsp; sys.dm_os_process_memory<br \/>\n\tCROSS JOIN<br \/>\n\t&nbsp;&nbsp;&nbsp; sys.dm_os_sys_memory<br \/>\n\tCROSS JOIN (<br \/>\n\t&nbsp;&nbsp;&nbsp; SELECT<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [value_in_use] AS [max_server_memory]<br \/>\n\t&nbsp;&nbsp;&nbsp; FROM<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.configurations<br \/>\n\t&nbsp;&nbsp;&nbsp; WHERE<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [name] = &#39;max server memory (MB)&#39;) AS c<br \/>\n\tCROSS JOIN (<br \/>\n\t&nbsp;&nbsp;&nbsp; SELECT<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [value_in_use] AS [min_server_memory]<br \/>\n\t&nbsp;&nbsp;&nbsp; FROM<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.configurations<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;WHERE<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [name] = &#39;min server memory (MB)&#39;) AS c2<\/font>\n\t<\/p>\n<\/blockquote>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">And on 2005\/2000, if you want to participate, send me the amount of memory on the Windows server, plus the min and max server memory configuration for SQL Server. There&#39;s some PowerShell in one of the early comments that will help (thanks Eric!).<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">You can either send me email with the info or leave a comment on this post. I&#39;ll editorialize the results in a couple of weeks.<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">Thanks!<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Time for another survey &#8211; this time around memory configuration. Here is some code to run if you&#39;re on SQL Server 2008 and 2008 R2 (thanks Jonathan!): SELECT &nbsp;&nbsp;&nbsp; [physical_memory_in_bytes] AS [PhysMemBytes], &nbsp;&nbsp;&nbsp; [physical_memory_in_use_kb] AS [PhysMemInUseKB], &nbsp;&nbsp;&nbsp; [available_physical_memory_kb] AS [PhysMemAvailKB], &nbsp;&nbsp;&nbsp; [locked_page_allocations_kb] AS [LPAllocKB], &nbsp;&nbsp;&nbsp; [max_server_memory] AS [MaxSvrMem], &nbsp;&nbsp;&nbsp; [min_server_memory] AS [MinSvrMem] FROM &nbsp;&nbsp;&nbsp; sys.dm_os_sys_info [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60,91],"tags":[],"class_list":["post-512","post","type-post","status-publish","format-standard","hentry","category-memory","category-surveys"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Survey: memory configuration - Paul S. Randal<\/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.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Survey: memory configuration - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"Time for another survey &#8211; this time around memory configuration. Here is some code to run if you&#039;re on SQL Server 2008 and 2008 R2 (thanks Jonathan!): SELECT &nbsp;&nbsp;&nbsp; [physical_memory_in_bytes] AS [PhysMemBytes], &nbsp;&nbsp;&nbsp; [physical_memory_in_use_kb] AS [PhysMemInUseKB], &nbsp;&nbsp;&nbsp; [available_physical_memory_kb] AS [PhysMemAvailKB], &nbsp;&nbsp;&nbsp; [locked_page_allocations_kb] AS [LPAllocKB], &nbsp;&nbsp;&nbsp; [max_server_memory] AS [MaxSvrMem], &nbsp;&nbsp;&nbsp; [min_server_memory] AS [MinSvrMem] FROM &nbsp;&nbsp;&nbsp; sys.dm_os_sys_info [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2012-02-07T13:26:00+00:00\" \/>\n<meta name=\"author\" content=\"Paul Randal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Randal\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/\",\"name\":\"Survey: memory configuration - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2012-02-07T13:26:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Survey: memory configuration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\",\"name\":\"Paul S. Randal\",\"description\":\"In Recovery...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\",\"name\":\"Paul Randal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"caption\":\"Paul Randal\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/paul\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Survey: memory configuration - Paul S. Randal","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.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/","og_locale":"en_US","og_type":"article","og_title":"Survey: memory configuration - Paul S. Randal","og_description":"Time for another survey &#8211; this time around memory configuration. Here is some code to run if you&#39;re on SQL Server 2008 and 2008 R2 (thanks Jonathan!): SELECT &nbsp;&nbsp;&nbsp; [physical_memory_in_bytes] AS [PhysMemBytes], &nbsp;&nbsp;&nbsp; [physical_memory_in_use_kb] AS [PhysMemInUseKB], &nbsp;&nbsp;&nbsp; [available_physical_memory_kb] AS [PhysMemAvailKB], &nbsp;&nbsp;&nbsp; [locked_page_allocations_kb] AS [LPAllocKB], &nbsp;&nbsp;&nbsp; [max_server_memory] AS [MaxSvrMem], &nbsp;&nbsp;&nbsp; [min_server_memory] AS [MinSvrMem] FROM &nbsp;&nbsp;&nbsp; sys.dm_os_sys_info [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/","og_site_name":"Paul S. Randal","article_published_time":"2012-02-07T13:26:00+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/","name":"Survey: memory configuration - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2012-02-07T13:26:00+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-memory-configuration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Survey: memory configuration"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/","name":"Paul S. Randal","description":"In Recovery...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce","name":"Paul Randal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","caption":"Paul Randal"},"sameAs":["http:\/\/3.209.169.194\/blogs\/paul"],"url":"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/comments?post=512"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/512\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}