Ken Henderson's WebLog

64-bit MemToLeave

Question:  On 64-bit SQL Server, which tends to be larger:  the Buffer Pool or the MemToLeave region?  Because it usually dominates the user mode portion of 32-bit SQL Server's process address space, it might make sense to assume that the BPool is usually larger, but that's not the case.  64-bit processes have an 8TB user mode address space.  Of this, a small portion is usually set aside for the BPool; the rest is left to MemToLeave.  Why is that?  As with 32-bit SQL Server, 64-bit SQL Server sizes the BPool according to the physical memory on the machine.  This is done in an attempt to keep SQL Server from being paged out.  We'd never want to commit more physical memory than exists on the box or we might cause Windows to page us out.  Given that even high-end 64-bit system still measure RAM in gigabytes, not terabytes, the maximum BPool size ends up being quite small compared to the MemToLeave region.  Take a high-end 64-bit system with 128GB of RAM, for example.  On this system, 64-bit SQL Server would set the max BPool size to 128GB, and leave the remaining 7 and 7/8ths of the 8TB user mode address space to MemToLeave.

What does this mean to you?  Well, for one thing, if you're seeing some extreme pressure in the MemToLeave region on your 32-bit system, and there's nothing from a software standpoint that you can do about it, moving to 64-bit SQL Server might be a good option for you.  Your MemToLeave consumers will at least have a much larger sandbox in which to play.

Published Wednesday, October 12, 2005 4:40 PM by khen1234

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Fitz Ferraris said:

How can we measure the consumption og the MemToLeave memory area ?

How do we determine the processes that are using the MemToLeave memory area ?
January 10, 2006 7:46 AM
 

SQL Server 2005: CLR Integration said:

There are two important memory considerations you may want to track when using SQL CLR functionality:...
March 24, 2006 2:01 PM
 

online directory main said:

Welcome!!! http://www.dirare.com/Sweden/">http://www.dirare.com/Sweden/ online directory. [URL=http://www.dirare.com]YP national[/URL]: MY yellowpages, SMART Yellow Pages, About DIRare. Also [url=http://www.dirare.com]global directory[/url] from online directory .
April 26, 2006 6:22 AM
 

online directory main said:

hello! http://www.dirare.com/Sweden/ online directory. MY yellowpages, SMART Yellow Pages, About DIRare. From online directory .
April 26, 2006 6:22 AM
 

米田 Blog ( SQL Server MEMO ) said:

SQL CLRのメモリ消費とRAM増減時の-gオプションの影響の変化
July 9, 2006 4:43 PM
 

» Memory Usage in SQL CLR | SQL Server Feeds said:

August 9, 2008 9:00 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker