Documentation says:
For example: A Standard Edition of SQL Server has buffer pool memory limited to 128GB, so the data and index pages cached in buffer pool is limited by 128GB. Starting with SQL Server 2016 SP1, you can have an additional 32GB of memory for Columnstore segment cache per instance and an additional 32GB of memory quota for In-Memory OLTP per database. In addition, there can be memory consumed by other memory consumers in SQL Server which will be limited by "max server memory" or total memory on the server if max server memory is uncapped.
We are using columnstore so I expect that SQL Server will be limited by using 128+32 Gb of memory. Memory optimized tables are not used.
But in reality more than 215 Gb is being used for buffer pool: enter image description here
Memory Clerks enter image description here
Overall sql process takes ~300Gb. enter image description here
select * from sys.dm_os_process_memory
Max memory set to 360Gb. Server has 380Gb.
What am I missing?
Version:
Microsoft SQL Server 2017 (RTM-CU14) (KB4484710) - 14.0.3076.1 (X64)
Mar 12 2019 19:29:19 Copyright (C) 2017 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)
UPDATE (2019年04月26日) Here is interesting thing - MEMORYCLERK_SQLBUFFERPOOL is presented by two records. Row #3 is exactly what I'd expect to see for Standard Edition. But what is the first row? Server has 2 processors with 48 cores total. buffer pool
1 Answer 1
I believe you missed the documentation. Please see the highlighted points in image below
The memory used by memory optimized tables is 32 GB PER DATABASE
So let us say you are having SQL Server standard edition having columnstore indexes and having memory optimized tables in 3 databases.
The maximum memory utilized can be
128+32+(3*32)= 256 GB.
Let me know for how many databases you are using memory optimized tables ?. The 128 GB limit is only for buffer pool
-
3They only mentioned using columnstore. And if they had a large amount of in-memory OLTP data, it would show up in the memory clerks as
MEMORYCLERK_XTP
(which is not in their top 10 clerks output).Josh Darnell– Josh Darnell2019年04月25日 17:34:22 +00:00Commented Apr 25, 2019 at 17:34 -
Interesting! Do you have any idea why they put it at a per database level? Splitting up mem optimized tables accross db's on standard edition could then be a viable strategy (if you have memory to spare)?Randi Vertongen– Randi Vertongen2019年04月25日 17:36:59 +00:00Commented Apr 25, 2019 at 17:36
-
We do not have memory optimized tables.Alex Bochkov– Alex Bochkov2019年04月25日 20:13:36 +00:00Commented Apr 25, 2019 at 20:13
SELECT DB_NAME(database_id) AS [Database Name], COUNT(page_id) AS [Page Count], CAST(COUNT(*)/128.0 AS DECIMAL(10, 2)) AS [Buffer size(MB)] FROM sys.dm_os_buffer_descriptors WHERE database_id <> 32767 AND is_in_bpool_extension = 1 GROUP BY DB_NAME(database_id) ORDER BY [Buffer size(MB)] DESC;
select * from sys.dm_os_process_memory
in the question