Page Life Expectancy metric measures the average time in seconds that pages stay in the buffer pool. It is closely related to page file usage – see here.
For optimal performance, data should be read from memory rather than disk, which is much slower. SQL achieves this by utilizing memory pages that store the most recently accessed data.
A reserved area of memory (the buffer pool) is available for storing these pages. When the buffer pool is full, and SQL requires new space, the server swaps the oldest page out to the page file on disk and reads in the new data. Increases in the number of swaps between memory and disk directly affect performance.
Sustained low levels of PLE are a strong indicator of SQL Server memory pressure. This pressure may result from high demand or inefficient data organization, both physical and logical.
Find out how you can save hours of work when investigating the root cause of this issue.
Symptoms:
SQL has detected a fall in page life expectancy, producing slower responses.
Impact: Medium
Slow SQL responses will degrade the user experience, resulting in poor efficiency of your organization’s operations.
Expected behavior :
The longer a page can stay in the buffer pool and be read from memory, the better the system performance.
We recommend setting the threshold value at 300 seconds for every 4 GB of Buffer Pool (BP) memory on your server. This means the server should retain any given page in memory (after a process references it) in the buffer pool for a minimum of 5 minutes before it is flushed to disk. If the buffer pool flushes pages in less than 300 seconds, there probably is a problem.
Possible causes:
1- Low CPU capacity Priority: Medium
A continually high usage rate may indicate the need for a CPU upgrade or the addition of multiple processors.
Alternatively, high CPU usage may indicate a poorly tuned application or SQL code. For most servers, CPU Usage of up to 70% is considered acceptable.
Optimizing the application can lower CPU utilization.
Problem identification:
Investigate the CPU usage over time and analyze if there are non-optimal queries that could consume less CPU through plan improvements or indexing.
Recommended action:
Continually high usage associated with low PLE may indicate the need for a CPU upgrade or additional processors, which might be a costly solution. See our explanation of CPU usage here.
Alternatively, high CPU usage may indicate a poorly tuned application or SQL code. Optimizing the application can lower CPU utilization.
2- Insufficient RAM Priority: Medium
The more memory your server has, the more cached disk reads and writes it can perform. A lack of system memory can cause high non-cached disk reads and writes.
Sustained low levels of Page life expectancy are a strong indicator of SQL Server memory pressure.
Problem identification:
Check the maximum server memory setting in SQL Server, comparing it with the existing total RAM memory.
Compare the ratio of physical RAM to database size – aim for RAM to be equal to or more than 20% of the largest database.
Recommended action:
If possible, allocate more memory to SQL. Set a value in the ‘maximum server memory’ option of the ‘server memory options’ page that leaves enough memory for the OS.
If RAM is less than 20% of the largest database, configure the SQL Server max memory to utilize all the possible memory without impacting other OS processes.
Alternately, physical RAM can be added to the server, and SQL memory allocation can be increased.
3- Page file busy/slow Priority: Low
The buffer pool swaps pages out to disk when memory space is needed. This process depends highly on the efficiency of data read/write actions to the hard drive and the demand level.
Problem identification:
Check if the page file usage consumption is higher than usual.
Check what else is running that might be slowing disk access speed.
Recommended action:
You can read more about pagefile use.
To speed up disk I/O and lower latency, locate the page file on the fastest available drive (or upgrade to more efficient hardware).
In addition, try to reduce competition for this resource from other operations.
Consider upgrading hardware if needed.
4- Index missing or corrupt Priority: High
Missing indexes means SQL Server suggests your query could run faster with an index. Corruption is 99% of the time related to disk or disk driver/firmware.
Problem identification:
Investigate missing or corrupt index issues that could improve the buffer cache hit ratio in SQL Server following these steps:
Recommended action:
Using our “missing index” and “plan improvement” recommendations, refer back to your system design team or DBA experts. If you need highly skilled professional DBA services, please contact us.
If your indexes are corrupted, contact your storage management team or our support experts for help. One possible remedy in cases where the corruption is repeating is to clone the database onto a new hardware configuration.
5- Queries saturating the Buffer Pool Priority: Low
We recommend reading more in the next article about Cache hit ratio.
6- DBCC CHECKDB running Priority: Low
CHECKDB is very resource intensive – probably one of the most resource-intensive things SQL Server performs. Introducing this process as an additional IO load on top of the normal SQL Server load means that disk heads will be moving constantly.
Problem identification:
Check if there is a daily schedule running DBCC CHECKDB commands for each Database.
Recommended action:
We suggest running any essential CHECKDB processes at a time of minimal SQL Server load, or alternatively on backup copies of the databases offline.
7- Index Rebuilds running Priority: Low
An index rebuild operation will always build a new index, which means extra space is required to build the new index before dropping the old one; a lot of CPU and I/O resources are required, which can overload the system.
Problem identification:
The index rebuild query execution plan is non-optimal to the server’s performance.
Recommended action:
If it occurs frequently, it can be corrected by changes in the indexing procedure, for example by switching to a strategy in which fragmentation is analyzed every night and only the fragmented indexes are processed. Our Expert Support Team consultants are available to analyze and assist.