I'm experiencing a strange issue on one of our SQL Server (SQL Server 2019 Enterprise CU18).
The server has 12 cores and 96GB physical memory and is also part of a failover cluster. Max memory has been set to 92GB (min memory is 0). The SQL Server service process has allocated all the 92GB.
In our monitoring we see that SQL Server always has approx 40GB of free memory (Memory Manager\Free Memory
).
In the error log I see that all 12 cores are used:
SQL Server detected 1 sockets with 12 cores per socket and 12 logical processors per socket, 12 total logical processors; using 12 logical processors based on SQL Server licensing.
All databases have their recovery interval set to 60 seconds.
This are the results of running EXEC sp_PressureDetector @what_to_check = 'memory';
As soons as Memory Manager\Free Memory
drops below 40GB the lazy writer kicks in to evict pages from the bufferpool so that the free memory goes back to 40GB.
After rebooting the server or failover, the same happens again.
Because there are 12 cores in one socket, SOFT-NUMA splits the 12 cores into 2 nodes of each 6 cores. I have a feeling that SQL Server is only using half of the memory due to the SOFT-NUMA but I can't prove this.
As a test I also lowered max memory with 20GB, expecting that Memory Manager\Free Memory
would drop with the same amount but it only dropped with 7GB.
Some further digging around in the ring buffers showed me that there is 'pool level pressure'
The timestamps of these entries match the start of the lazywriter.
Does this mean that there is pressure on the bufferpool or how do I need to interpret this?
Can somebody explain this strange behavior or point me in the right direction to troubleshoot this issue further?