|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 9:41 AM
Points: 97,
Visits: 551
|
|
Hi All,
We have SQL 2008R2 Standard Ed.(64 bit) installed on Windows 2008 R2. Physical RAM on Server is 48GB.
We have set SQL maximum memory to 35GB.
Is there any way to know about how much memory is getting utilized by the SQL server out of 35GB. Below are some details
Target Server Memory (KB) = 36700160 Total Server Memory (KB) = 36700160
Memory from task manager in MB
Total 49142 Cached 2648 Available 8222 Free 5624
sqlsvr.exe 38456316 (in KB)
Which information is correct how do I calculate memory usage for SQL out of 35GB (35840MB)
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 8:27 PM
Points: 6,735,
Visits: 11,788
|
|
Amount of memory being used for the buffer pool:
SELECT CAST((bpool_committed * 8) / (1024.0 * 1024.0) AS DECIMAL(20, 2)) AS BufferPoolCommittedMemoryGB FROM sys.dm_os_sys_info;
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 9:41 AM
Points: 97,
Visits: 551
|
|
Hi,
Thanks for your reply.
Out put of your query is 35GB which I have set for max server memory.
I got some query from blog of SSC only which give the utilization of buffer.
With CTE_BP(DatabaseName, BufferSizeInMB ) as ( SELECT case when DB_NAME(b.database_id) is null then 'Resource DB' else DB_NAME(b.database_id) end AS database_name ,(cast(COUNT(*) as decimal(20,2)) * 8192.00) / (1024.00 * 1024) AS buffer_count_MB FROM sys.dm_os_buffer_descriptors AS b GROUP BY b.database_id ) select * from CTE_BP order by BufferSizeInMB desc
Here is the out put memory in MB db1 18035.23438 db2 5483.632813 tempdb 2719.28125 db3 1926.796875 db4 718.359375 msdb 98.3828125 Resource DB 18.625 master 0.9609375 model 0.359375
If I some up this 29001.63281 MB. So now what is the difference between bpool_commited memory & buffer descriptor memory. Can I some how know the details of 35GB utilization same like buffer descriptor memory so that I can properly justify the 35GB as the max server memory setting.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 4:11 PM
Points: 37,741,
Visits: 30,020
|
|
Your query returns the size of the data cache, which is one component of the buffer pool. There are a lot of other caches including the plan cache also within the buffer pool.
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
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 9:41 AM
Points: 97,
Visits: 551
|
|
Thanks for the reply Gail.
so bpool_commited is the only consolidated way to describe the memory usage out of max server memory setting.
Any reference to calculate memory of all component will be helpful..
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 3:36 AM
Points: 305,
Visits: 493
|
|
select Type, SUM(single_pages_kb)/(1024.00) SingleP_MB , SUM(Multi_pages_kb)/(1024.00) MultiP_MB , SUM(virtual_memory_committed_kb)/(1024.00) VirtualP_MB , SUM(shared_memory_committed_kb)/(1024.00) SharedP_MB , SUM(awe_allocated_Kb)/(1024.00) AWEp_MB From sys.dm_os_memory_clerks Group by type
try this..
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 9:41 AM
Points: 97,
Visits: 551
|
|
Thanks for the reply.
I have attached out put of this query in excel format.
So then SQL max server memory = Sum(SingleP_MB)+Sum(MultiP_MB)+data cache memory.
Please correct if I am wrong.
Thanks again to all for all great efforts.
|
|
|
|