我在使用我们的生产服务器解决问题时遇到问题,我将为您提供有关此问题的背景信息。
我们从app端有SQL server 2012 standard = SP2 + CU6和Java / hibernate。 64GB内存并为SQL服务器分配55GB。
我们最近做了一些API更改并发现了这种行为。
PLI正在下降(有些时候)到大约2分钟,当我检查缓冲池大小时,它下降到大约4GB,在此期间我会注意到由于缓冲池问题而预期的PAGEIOLATCH_SH等待类型。
我的问题是为什么SQL将缓冲池大小降低到4GB(最大内存为55GB)以及如何解决此问题。此问题仅在某些时间发生,等待时间仅在此期间增加。
使用sys.dm_os_memory_clerks,但它与分配给sql server的总内存不匹配
请帮我提一些建议以找出问题所在。有没有办法找到系统中的总内存使用量并找到丢失的内存?
答案 0 :(得分:2)
有没有办法找到系统中的总内存使用量并找到丢失的内存?
是的,有:
-- To get the total physical memory installed on SQL Server
SELECT [total_physical_memory_kb] / 1024 AS [Total_Physical_Memory_In_MB]
,[available_page_file_kb] / 1024 AS [Available_Physical_Memory_In_MB]
,[total_page_file_kb] / 1024 AS [Total_Page_File_In_MB]
,[available_page_file_kb] / 1024 AS [Available_Page_File_MB]
,[kernel_paged_pool_kb] / 1024 AS [Kernel_Paged_Pool_MB]
,[kernel_nonpaged_pool_kb] / 1024 AS [Kernel_Nonpaged_Pool_MB]
,[system_memory_state_desc] AS [System_Memory_State_Desc]
FROM [master].[sys].[dm_os_sys_memory]
--To get the minimum and maximum size of memory configured for SQL Server.
SELECT [name] AS [Name]
,[configuration_id] AS [Number]
,[minimum] AS [Minimum]
,[maximum] AS [Maximum]
,[is_dynamic] AS [Dynamic]
,[is_advanced] AS [Advanced]
,[value] AS [ConfigValue]
,[value_in_use] AS [RunValue]
,[description] AS [Description]
FROM [master].[sys].[configurations]
WHERE NAME IN ('Min server memory (MB)', 'Max server memory (MB)')