DBCC memorystatus()

Category: sql server distributed

Question

sakurai_db on Wed, 01 Aug 2018 08:27:58


What's VM reservsed and VM commited ?

https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-os-memory-clerks-transact-sql?view=sql-server-2017

I still don't understand after reading the above description.

Replies

Shanky_621 on Wed, 01 Aug 2018 09:05:08


Did you went through this Undersanding DBCC memorystatus output  ?

VM: means virtual memory

VM reserved: Means amount of virtual memory SQl Server has reserved, this reservation is based on future calculations. 

VM committed: Amount of virtual memory committed. A committed memory is one with physical RAM address mapped to it. This means the memory is being utilized at some point of time.

When a process in SQL Server needs memory. Memory manager first assigns memory from virtual address space(VAS) and looks for region in physical memory to map it to that and make it committed. Once mapped the memory is committed and process can start using it.

EDIT: Lot of things in DBCC MEMORYSTATUS  is undocumented and you can see no updated document from MS. Its is better to rely on DMV's for memory information.



Cheers,

Shashank

Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

My TechNet Wiki Articles

MVP


sakurai_db on Wed, 01 Aug 2018 09:47:19


VM reserved is fixed size? it include paging space ?

I see VM reservsed is much larger even than the physical memory of the server

sakurai_db on Wed, 01 Aug 2018 09:47:45


by the way. what's the relationship between memory clerk and memory objects?

Shanky_621 on Wed, 01 Aug 2018 09:56:04


VM reserved is fixed size? it include paging space ?

I see VM reservsed is much larger even than the physical memory of the server

Ofcourse VM reserved will be larger, it represents VAS in SQL Server. For SQL Server 64 bit system VAS is 8 TB. VAS means total amount of virtual address space. It depends on architecture for 64 bit VAS is 2^64 which comes to some peta byte but since that number is not literally possible now the VAs was limited to 8 TB. I do not think VAs inlcudes paged memory, pages memory is temporary disk area.

by the way. what's the relationship between memory clerk and memory objects?
Clerks are one who track memory allocations to various objects. Objects use memory, clerks track how much memory objects have used.

sakurai_db on Thu, 02 Aug 2018 02:24:24


thankyou

VM reserved is around 3.6GB

VM committed only 16MB

Means only 16MB use in Physical memory for bufferpool ?

Shanky_621 on Thu, 02 Aug 2018 04:45:18


thankyou

VM reserved is around 3.6GB

VM committed only 16MB

Means only 16MB use in Physical memory for bufferpool ?

FYI: You are looking this value for one of the clerk SQLBUFFERPOOL and that to on node 0 so this is only half the info.  Yes as per value, committed at that point of time, is 16 MB and reserved around 3.6 GB which can ofcourse change in future 

sakurai_db on Thu, 02 Aug 2018 06:38:23


so it's a bit strange , because to SQL server total memory is around up to 4GB already

 total memory  as I know it's the memory used by sql server in PHYSICAL memory for buffer pool,plan cache....etc..

Shanky_621 on Thu, 02 Aug 2018 06:50:58


so it's a bit strange , because to SQL server total memory is around up to 4GB already

 total memory  as I know it's the memory used by sql server in PHYSICAL memory for buffer pool,plan cache....etc..

What is strange here VM means virtual memory which is 8 TB and any process in SQl Server can see this 8 TB virtual memory and can reserve accordingly. Physical memory is limited and that is RAM on the system, and when physical memory is mapped to virtual then memory is allocated. The reserved has hardly and correlation with committed, process can reserve as much as it likes but committed is what actual it is using.