Memory Statistics

The metrics in this category provide information about various memory-related performance issues.

Default Collection Interval — Every 15 minutes

Table 1-50 Memory Statistics Metrics

Metric Description and User Action

Average Latch Wait Time (ms)

Average latch wait time in milliseconds for latch requests that had to wait.

If this number is high, your server might have resource limitations.

Buffer Cache Hit Ratio (%)

Percentage of pages found in the buffer cache without having to read from disk. The ratio is the total number of cache hits divided by the total number of cache lookups since the SQL Server was started. After a long period of time, the ratio does not change very much.

Because reading from the cache is much less expensive than reading from disk, this ratio should be high. Generally, you can increase the buffer cache hit ratio by increasing the amount of memory available to the SQL Server.

Cache Hit Ratio (%)

Percentage of pages found in the cache without needing to read from disk. The ratio is the total number of cache hits divided by the total number of cache lookups since the SQL Server was started. After a long period of time, the ratio does not change very much.

Because reading from the cache is less expensive than reading from disk, this ratio should be high. The higher this value is, the better. Generally, you can increase the cache hit ratio by increasing the amount of memory available to the SQL Server.

Log Flush Wait Time (ms)

Log cache is very important, because it rolls back a transaction before it is committed if the circumstances warrant. But after a transaction is complete (and no longer can be rolled back), this log cache is immediately flushed to the physical log file. This is a normal procedure.

SELECT queries that do not modify data do not create transactions and do not produce log flushes. Essentially, a log flush occurs when data is written from the log cache to the physical log file. Therefore, a log flush occurs every time a transaction completes, and the number of log flushes that occur are related to the number of transactions performed by the SQL Server.

One way to troubleshoot the disk I/O bottleneck is to capture the Log Flushes/sec counter data and see how busy this mechanism is. If the server experiences a lot of transactions, it will also experience a lot of log flushes, so the value you see for this counter can vary from server to server, depending on how busy it is with action-type queries that create transactions.

Try to identify situations where the number of log flushes per second seems to be significantly higher than the expected number of transactions that you think should be running on a server.

Total Lock Wait Time (ms)

Total wait time in milliseconds for locks in the last second. If the value is high, your server has high resource contention.