Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Buffer Cache Hit Ratio / Checkpoint Pages per Sec #31

Merged
merged 2 commits into from Jul 13, 2019

Conversation

@james-m-tubbs
Copy link
Contributor

@james-m-tubbs james-m-tubbs commented Apr 19, 2019

From https://www.datadoghq.com/blog/sql-server-monitoring/:

Buffer cache hit ratio

The buffer cache hit ratio measures how often the buffer manager can pull pages from the buffer cache versus how often it has to read a page from disk. The larger the buffer cache, the more likely it is that SQL Server can find its desired pages within memory. SQL Server calculates the size of the buffer cache automatically, based on various system resources such as physical memory. If your buffer cache hit ratio is too low, one solution is to see if you can increase the size of the buffer cache by allocating more system memory.

Checkpoint pages/sec

During a checkpoint, the buffer manager writes all dirty pages to disk. As we’ve seen, during lazy writing, SQL Server only writes some pages, letting the buffer manager make room in the buffer cache for new pages. By monitoring the rate at which pages are moved from the buffer cache to disk specifically during checkpoints, you can start to determine whether to add system resources (to create a larger buffer cache) or reconfigure your checkpoints (e.g., by specifying a recovery time) as you work to optimize the buffer manager.

@free
Copy link
Owner

@free free commented Jul 13, 2019

Thanks for contributing. And as usual, apologies for how long it took.

@free free merged commit 5ae9ed2 into free:master Jul 13, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rudi-bruchez
Copy link

@rudi-bruchez rudi-bruchez commented Aug 6, 2019

Hello, buffer cache hit ratio is not correct here, sorry. The value must be calculated from the base value. Example : https://github.com/rudi-bruchez/tsql-scripts/blob/c920c631c47560a8575ceae0ef135dd9bb2b913b/diagnostics/performance-counters.sql

burningalchemist added a commit to burningalchemist/sql_exporter that referenced this pull request Nov 27, 2019
* add buffer cache hit ratio to default mssql metrics
* add checkpoint pages per second
@james-m-tubbs james-m-tubbs deleted the james-m-tubbs:add-buffer-cache-metrics branch Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.