Real-time data cache flushing threshold adjustment in a server computer
First Claim
1. A method of operating a data cache, comprising the steps of:
- maintaining clean and dirty data buffers in the data cache, clean buffers containing only data received from a backing store containing a copy of the data, dirty buffers containing data received from a data source other than the backing store and intended to be written to the backing store but not yet so written;
monitoring the ratio of clean buffers to the sum of clean and dirty buffers in the data cache;
maintaining a data cache flushing threshold Rc representing a minimum desirable ratio of clean buffers to the sum of clean and dirty buffers;
flushing dirty buffers from the data cache to the backing store in response to the condition that the ratio of clean buffers to the sum of clean and dirty buffers in the data cache is less than Rc ;
periodically monitoring the following statistics pertaining to operation of the data cache;
(a) a flushing rate representing the rate at which dirty buffers are being flushed from the data cache to the backing store, and (b) the numbers of read operations and write operations received by the data cache in the most recent monitoring period;
calculating an average read rate Nr-avg and an average write rate Nw-avg from the monitored numbers of read and write operations;
determining whether the flushing rate is exhibiting saturation behavior;
for the following sets of conditions, performing the corresponding steps;
if the flushing rate has changed over a first number of preceding periods but is not exhibiting saturation behavior, then setting Rc to a new value equal to the ratio of Nr-avg to the sum of Nr-avg and Nw-avg ;
if the flushing rate is exhibiting saturation behavior, then setting Rc to a new value equal to either (i) the ratio of Nr-avg to the sum of Nr-avg and Nw-avg, if that ratio is less than Rc, or (ii) 80% of Rc otherwise; and
if the flushing rate has not changed over the first number of preceding periods, then refraining from changing the value of Rc.
2 Assignments
0 Petitions
Accused Products
Abstract
In a method and system for dynamically improving the performance of a server in a network, a tuning system monitors a workload of the server in real time, monitors a set of internal performance characteristics of the server in real time, and monitors a set of adjustable server parameters of the server in real time. The workload of the server may include the frequency and type of service requests received by the server from clients in the network. The internal server performance characteristics may include, for example, a data cache hit ratio of a data cache in the server. The set of server parameters may include, for example, the overall data cache size or the data cache geometry of the server. The tuning system periodically alters one or more of the set of adjustable server parameters as a function of the workload and internal performance characteristics of the server. Since the tuning system is continuously monitoring workload and performance characteristics of the server and altering the server parameters accordingly, the effectiveness of a given change in the server parameters is reflected in the next set of monitored workload and performance values.
119 Citations
2 Claims
-
1. A method of operating a data cache, comprising the steps of:
-
maintaining clean and dirty data buffers in the data cache, clean buffers containing only data received from a backing store containing a copy of the data, dirty buffers containing data received from a data source other than the backing store and intended to be written to the backing store but not yet so written; monitoring the ratio of clean buffers to the sum of clean and dirty buffers in the data cache; maintaining a data cache flushing threshold Rc representing a minimum desirable ratio of clean buffers to the sum of clean and dirty buffers; flushing dirty buffers from the data cache to the backing store in response to the condition that the ratio of clean buffers to the sum of clean and dirty buffers in the data cache is less than Rc ; periodically monitoring the following statistics pertaining to operation of the data cache;
(a) a flushing rate representing the rate at which dirty buffers are being flushed from the data cache to the backing store, and (b) the numbers of read operations and write operations received by the data cache in the most recent monitoring period;calculating an average read rate Nr-avg and an average write rate Nw-avg from the monitored numbers of read and write operations; determining whether the flushing rate is exhibiting saturation behavior; for the following sets of conditions, performing the corresponding steps; if the flushing rate has changed over a first number of preceding periods but is not exhibiting saturation behavior, then setting Rc to a new value equal to the ratio of Nr-avg to the sum of Nr-avg and Nw-avg ; if the flushing rate is exhibiting saturation behavior, then setting Rc to a new value equal to either (i) the ratio of Nr-avg to the sum of Nr-avg and Nw-avg, if that ratio is less than Rc, or (ii) 80% of Rc otherwise; and if the flushing rate has not changed over the first number of preceding periods, then refraining from changing the value of Rc.
-
-
2. A method of operating a data cache, comprising the steps of:
-
initializing a flag variable OK-- TO-- INCREASE to TRUE; periodically determining a moving average hit ratio Ravg for the data cache over a first number of preceding periods; periodically determining a cache availability ratio CA representing one minus the ratio of the number of times the data cache had to be flushed to free a buffer to satisfy a read or write request to the total number of read and write requests during the most recent period; calculating an average cache availability ratio CAavg equal to the average value of CA over a first number of most recent sampling periods; for the following cases of the calculated value of CAavg, performing the corresponding steps as follows; ≦
CAavg ≦
80%;
if the size of the data cache is less than a maximum size Smax, then increasing the number of buffers in the data cache to the lesser of twice the number of buffers in the cache during the present period and a maximum number Nht of buffers contained in the data cache when the data cache size is Smax ; and80%<
CAavg ≦
90%;
for the following cases of the determined value of Ravg, performing the corresponding steps as follows;0≦
Ravg ≦
50%;
if the size of the data cache is less than Smax, then increasing the number of buffers in the data cache to the lesser of twice the number of buffers in the cache during the present period and Nht ;50%<
Ravg ≦
80%;
(a) determining the data cache hit ratio for each of a second number of preceding periods;
(b) setting the OK-- TO-- INCREASE flag to FALSE if the hit ratio over the second number of preceding periods has not substantially change;
(c) setting the OK-- TO-- INCREASE flag to TRUE if the hit ratio has decreased over any of the second number of preceding periods;
(d) if the OK-- TO-- INCREASE flag is TRUE and the size of the data cache is less than Smax, then increasing the number of buffers in the data cache to the lesser of 1.25 times the current number of buffers and Nht ;80%<
Ravg ≦
90%;
(a) determining the data cache hit ratio for each of a third number of preceding periods;
(b) setting the OK-- TO-- INCREASE flag to FALSE if the hit ratio over the third number of preceding periods has not increased monotonically;
(c) setting the OK-- TO-- INCREASE flag to TRUE if the hit ratio has decreased over any of the third number of preceding periods;
(d) if the OK-- TO-- INCREASE flag is TRUE and the size of the data cache is less than Smax, then increasing the number of buffers in the data cache to the lesser of 1.10 times the current number of buffers and Nht ; and
90%<
Ravg ≦
100%;
leaving the number of buffers in the data cache unchanged.
-
Specification