eG Monitoring
 

Measures reported by SybMonProcCacheTest

Adaptive Server maintains an MRU/LRU (most recently used/least recently used) chain of stored procedure query plans. As users execute stored procedures, Adaptive Server looks in the procedure cache for a query plan to use. If a query plan is available, it is placed on the MRU end of the chain, and execution begins. If no plan is in memory, or if all copies are in use, the query tree for the procedure is read from the sysprocedures table. It is then optimized, using the parameters provided to the procedure, and put on the MRU end of the chain, and execution begins. Plans at the LRU end of the page chain that are not in use are aged out of the cache. The memory allocated for the procedure cache holds the optimized query plans (and occasionally trees) for all batches, including any triggers. If adequate memory is not available to the cache, then cache misses will increase, thereby causing direct accesses to database tables to rise; if this trend continues, then the performance of the database server will suffer. By periodically monitoring the usage of the procedure cache, administrators can promptly detect insufficient memory allocations to the cache; based on the findings, they can resize the cache to ensure peak performance of the database server. This test reports whether/not the procedure cache has been utilized optimally. For execution, the test requires the enable monitoring configuration parameter to be enabled.

 The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
ProcedureHitRatio Indicates the percentage of time a stored procedure query plan required by a user was available in the procedure cache. Percent Ideally, the value of this measure should be high. A low value indicates that many stored procedure query plan that users required were, more often than not, unavailable in the procedure cache. To ensure that accesses to physical database tables do not increase as a result, check the most accessed procedure and place it in named cache.

A low cache hit rate could also indicate a badly sized cache. Use the detailed diagnosis of this test to view the top-5 procedures in the cache in terms of memory usage.

If need be, you can resize the cache using the following formula:

(max # of concurrent users ) * (4 + size of largest plan ) * 1.25