Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sql server memory usage - does it ever use page file? Expand / Collapse
Author
Message
Posted Monday, November 26, 2012 2:30 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, August 21, 2014 10:33 AM
Points: 1,283, Visits: 2,959

Lets say my physical box has 64 gb RAM and out of that 52 gb is assigned to sql server. All this time i was thinking that if at any point sql needs more than 52 gb it would use page file. Someone told me that if sql needs more than 52gb it would just remove existing pages from RAM and would NEVER use page file. Is that true?
Post #1388853
Posted Monday, November 26, 2012 11:23 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, March 21, 2014 9:46 AM
Points: 387, Visits: 1,078
"All this time i was thinking that if at any point sql needs more than 52 gb it would use page file".

Yes, SQL Server will "page out" some of the pages from RAM to Page file for some reasons. But you should worry when its because of RAM memory shortage.
Post #1388960
Posted Tuesday, November 27, 2012 12:05 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 7:53 AM
Points: 42,822, Visits: 35,952
sqldba_newbie (11/26/2012)
All this time i was thinking that if at any point sql needs more than 52 gb it would use page file.


No. By setting max server memory to 52 GB, you've hard-set the max size of the buffer pool at 52 GB. If SQL needs the buffer pool to be bigger than that, too bad, it can't get bigger. If more memory is required then existing pages in the buffer pool will have to be discarded and then the new memory brought in.

SQL can and does use a little memory over and above the buffer pool, so over that 52 GB. This is still in memory and usually is not much.

Someone told me that if sql needs more than 52gb it would just remove existing pages from RAM and would NEVER use page file.


SQL cannot choose to use the page file, that's an OS choice. If SQL is using 52 GB of memory and the OS comes under memory pressure then, assuming that locked pages in memory is not set, the OS will first request that SQL trim it's memory usage down (reducing the buffer pool to under 52 GB). If it does not do so fast enough, then the OS will move some of that 52 GB out of memory and into the page file. This is not a good thing, page file is disk hence way slower than memory



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1388982
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse