Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to know SQL Server Memory Utilization


How to know SQL Server Memory Utilization

Author
Message
vinod.saraswat
vinod.saraswat
SSC Journeyman
SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)

Group: General Forum Members
Points: 99 Visits: 712
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)
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8275 Visits: 14368
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
vinod.saraswat
vinod.saraswat
SSC Journeyman
SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)

Group: General Forum Members
Points: 99 Visits: 712
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.
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47412 Visits: 44399
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, 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


vinod.saraswat
vinod.saraswat
SSC Journeyman
SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)

Group: General Forum Members
Points: 99 Visits: 712
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..
SQL Show
SQL Show
Old Hand
Old Hand (395 reputation)Old Hand (395 reputation)Old Hand (395 reputation)Old Hand (395 reputation)Old Hand (395 reputation)Old Hand (395 reputation)Old Hand (395 reputation)Old Hand (395 reputation)

Group: General Forum Members
Points: 395 Visits: 1078
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..
vinod.saraswat
vinod.saraswat
SSC Journeyman
SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)

Group: General Forum Members
Points: 99 Visits: 712
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.
Attachments
memory utilization.xlsx (15 views, 13.00 KB)
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