Context: I have a SQL Server instance running on one of our VMs with 64 GB of memory. There is currently a max limit of 60 GB and a min limit of 0 GB. SQL Server is the only application running on the server that consumes significant memory.
I recently launched a feature that makes repeated expensive queries to SQL Server and anytime there are a lot of users using the feature, the memory usage increases as expected. I haven’t hit anywhere near the limit, but I’m curious as to what happens when we do approach it.
Per the MS docs, I’ve read that SQL Server dynamically handles memory for use as it needs, but I haven’t been able to find anything about the logic in which SQL Server dynamically frees memory.
Questions:
- Does it begin freeing memory before hitting the specified limit? What (else) triggers memory to be freed?
- How does SQL Server determine which memory to free? Does it free memory in a FIFO manner?
Am I completely missing any points?