今天我遇到的一个现象就是虽然"max server memory"已经设置成了58.9G,但在windows task manager里面看到sqlservr.exe使用的内存已经达到了61G。
原因是
SQL Server will consume as much memory as you will allow it. By default, that number would encompass 100% of your numerical memory on your machine. That's why you're seeing what you're seeing. If you give SQL Server 24 GB of memory, then SQL Server will do its best to use 24 GB of memory. Then you have SQL Server and the OS battling for resources, and it'll always result in poor performance.
When you set the max server memory
configuration limit, you are limiting how much SQL Server can allocate for the buffer pool (virtually where it stores data pages and the procedure cache). There are other memory clerks within SQL Server, so for your particular version (2008 R2 and below), max server memory
just controls the buffer pool. But this is always going to be the biggest memory consumer.