SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


sql server memory usage - does it ever use page file?


sql server memory usage - does it ever use page file?

Author
Message
curious_sqldba
curious_sqldba
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2926 Visits: 3637
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?
SQL Show
SQL Show
SSChasing Mays
SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)

Group: General Forum Members
Points: 651 Visits: 1078
"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.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)

Group: General Forum Members
Points: 87535 Visits: 45272
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, MVP, M.Sc (Comp Sci)
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


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search