Our production server (2012, VM + SAN) has 32 GB of RAM, the database size is ~80GB. The application uses TempDB heavily – disk is hit ~100 MBps both reads & writes. Seeing tons of SQL compilations/sec .. 95% of all batch requests are compilations.
Ideally would like to increase the RAM to 64GB or 128GB, but need to 'prove' to team that it's required.
Buffer Cache Hit Ratio (BCHR) is 99.9%, but Page Life Expectancy (PLE) is only ~400.
What's the explanation for this ?
I though PLE & BCHR had a linear relationship (i.e. they increase or decrease together)
On other VMs with larger databases and lot more RAM, both BCHR & PLE are high.
Best Answer
BCHR can be very misleading due to read-ahead:
The Database Engine supports a performance optimization mechanism called read-ahead. Read-ahead anticipates the data and index pages needed to fulfill a query execution plan and brings the pages into the buffer cache before they are actually used by the query. This allows computation and I/O to overlap, taking full advantage of both the CPU and the disk.[link]
You are very likely seeing the impact of read-ahead filling the buffer cache pre-emptively, which distorts the BCHR counter. Excellent and very in-depth article from Jonathan Kehayias titled Great SQL Server Debates: Buffer Cache Hit Ratio covers this.