Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Learn about SQL Server DBA, SQL Server database performance,SQL Server optimisation,database tuning,t-sql,ssis
Browse by Tags · View All
DBA Scripts 51
performance 37
SQL Server 29
Object Management 24
#SQLServer 24
Backup and Restore 20
Security Management 20
Powershell 17
Indexes 14
DBA 14

Archive · View All
June 2011 38
January 2011 33
May 2011 32
August 2011 27
July 2011 26
January 2012 24
February 2011 19
April 2011 19
March 2011 17
March 2012 17

Jack Vamvas's Blog

SQL Server Buffer Cache Hit Ratio and memory pressure

Jun 8 2011 8:06AM by Jack Vamvas   

Buffer Cache Hit Ratio is the percentage of sql server pages requested and retrieved from the buffer cache without reading from disk.

SQL Server reads data pages into a pool of memory called the Buffer Cache. The Buffer Cache Hit Ratio is a good indicator of Buffer Cache performance.

The calculation is: total number of cache hits \ total number of cache lookups from the previous few thousand page requests.

Reading from disk is expensive, it is generally faster to read from cache. Maintaining a high Buffer Cache Hit Ratio indicates a large amount of pages are accessed from cache – meaning data will return faster.

The Buffer Cache Hit Ratio is a good measure of memory pressure,along with the Page Life Expectancy measure . They both measure slightly different aspects of the buffer cache.

When using Buffer Cache Hit Ratio don’t use the absolute value, but measure over a period of time. Look for a trend. I prefer to monitor for at least 30 minutes over a typical user workload.

The Microsoft recommendation is 95% and higher. If the percentage drops less for a period of time – one way of increasing the Buffer Cache Hit Ratio could be to increase physical memory.

There are situations where it’s obvious increasing physical memory will improve the Buffer Cache Hit Ratio, but not always. In those situations look first to:

a)index optimization and sql server tuning

b)table design

c)quality queries, that could mean rewriting queries

d)SQL Server memory configuration

To measure the Buffer Cache Hit Ratio trend, there are two methods I use

Method 1 – Perfmon. Add Buffer cache hit ratio for the SQL Server Instance

Method 2 – Query the sys.dm_os_performance_counters

--alter the 'MSSQLServer:Buffer Manager' if using a name instance e.g --'MSSQL$INST1:Buffer Manager'

SELECT ROUND(CAST(A.cntr_value1 AS NUMERIC) /
CAST(B.cntr_value2 AS NUMERIC),3) AS Buffer_Cache_Hit_Ratio
FROM ( SELECT cntr_value AS cntr_value1
FROM sys.dm_os_performance_counters
WHERE object_name = 'SQLServer:Buffer Manager' AND counter_name = 'Buffer cache hit ratio'
) AS A,

(SELECT cntr_value AS cntr_value2
FROM sys.dm_os_performance_counters
WHERE object_name = 'SQLServer:Buffer Manager' AND counter_name = 'Buffer cache hit ratio base'
) AS B;

The SQL Server Buffer Cache Hit Ratio is useful for memory bottleneck, but should be used with other indicators. I’ve mentioned Page Life Expectancy, but another related indicator is the SQL Server Plan Cache Object and Cache Hit Ratio – which I’ll write about in a future post.

Republished from http://www.sqlserver-dba.com.


Republished from SQL Server DBA [65 clicks].  Read the original version here [32134 clicks].

Jack Vamvas
5 · 27% · 8528
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]