SQL Server 2012 – Changed Max Memory Setting but No Increase in OS Memory Usage

memorysql-server-2012

We have increased the RAM capacity on the OS to 40G and I have changed the max memory parameter to 36G in SSMS.

When I select "current value", it shows 36G.

However, monitoring memory usage at OS level doesn't show more memory being consumed.

I know that, in theory, it's possible to change the max memory setting while SQL Server is still running, but does it really work? Do I need to restart the server? Or am I being impatient?

Thanks

Best Answer

That setting is not "go use a bunch of memory for whatever." It is a setting that dictates the maximum usage of memory for the buffer pool (data cache, plan cache, and a few other areas of memory reservation).

In order to actually use 36GB of memory, you need to run queries that will force the buffer manager to pull data off disk and put it into memory. Run the following query and you will see memory usage rise (also, in case it is where you are looking, do not use Task Manager for this).

SELECT * FROM dbo.YourBiggestTable AS ybt1
  CROSS JOIN dbo.YourBiggestTable AS ybt2;