-1

I have 32GB server running a SQL Server instance and I have set the max server memory to 22 GB which is 75% of the total memory.

What is the reason for SQL Server to exceed its allocated max server memory setting?

Here is the screenshot of of top 5 allocation list.

enter image description here

When I add all of this up it seems it is almost near to 22 GB. That is why I am wondering: What is the reason my SQL Server is utilising 81% of the server memory, instead of just 75% as per my configuration?

John K. N.
  • 18,854
  • 14
  • 56
  • 117

2 Answers2

4

You didn't specify what version of SQL Server you are running. Anyhow, there are stuff allocated outside of the max server memory setting. Exactly what stuff depends on the version of SQL Server - there were changes made in 2012.

As of 2012, especially thread stacks are outside the max setting. For earlier versions, other things are also outside this setting.

More info at: https://learn.microsoft.com/en-us/sql/relational-databases/memory-management-architecture-guide?view=sql-server-ver15

Tibor Karaszi
  • 18,269
  • 2
  • 17
  • 30
0

(Posting this as an answer because it's too large for a comment, but you should accept Tibor's answer which is where I found this note.)

In the Memory Management Architecture Guide that Tibor linked, this note is made that communicates how the max memory setting does not control everything that the SQL Server process is using in memory, only a subset (the buffer pool / caches):

SQL Server as a process acquires more memory than specified by max server memory option. Both internal and external components can allocate memory outside of the buffer pool, which consumes additional memory, but the memory allocated to the buffer pool usually still represents the largest portion of memory consumed by SQL Server.

J.D.
  • 40,776
  • 12
  • 62
  • 141