Sql-server – SQL used memory exceed to its max memory

memorysql server

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?

Best Answer

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://docs.microsoft.com/en-us/sql/relational-databases/memory-management-architecture-guide?view=sql-server-ver15