In this paper, we develop approximate analytical models for predicting the buffer hit probability under the Least Recently Used (LRU) and First In First Out (FIFO) buffer replacement policies under the independent reference model. In the case of the analysis of the LRU policy, the computational complexity for estimating the buffer hit probability is O(KB) where B is the size of the buffer and K denotes the number of items having distinct access probabilities. In the case of the FIFO policy, the solution algorithm is iterative and the computational complexity of each iteration is O(K). Results from these models are compared to exact results for models originally developed by King [KING71] for small values of the buffer size, B, and the total number of items sharing the buffer, D. Results are also compared with results from a simulation for large values of B and D. In most cases, the error is extremely small (less than 0.1%) for both LRU and FIFO, and a maximum error of 3% is observed for very small buffer size (less than 5) when the access probabilities are extremely skewed. To demonstrate the usefulness of the model, we consider two applications. In our first application, we compare the LRU and FIFO policies to an optimal static buffer allocation policy for a database consisting of two classes of data items. We observe that the performance of LRU is close to that of the optimal allocation. As the optimal allocation requires knowledge of the access probabilities, the LRU policy is preferred when this information is unavailable. We also observe that the LRU policy always performs better than the FIFO policy in our experiments. In our second application, we show that if multiple independent reference streams on mutually disjoint sets of data compete for the same buffer, it is better to partition the buffer using an optimal allocation policy than to share a common buffer.
[1]
Samuel DeFazio,et al.
Diversity in database reference behavior
,
1989,
SIGMETRICS '89.
[2]
Peter J. Denning,et al.
Operating Systems Theory
,
1973
.
[3]
Tomás Lang,et al.
Database buffer paging in virtual storage systems
,
1977,
TODS.
[4]
W. Frank King,et al.
Analysis of Demand Paging Algorithms
,
1971,
IFIP Congress.
[5]
Domenico Ferrari,et al.
Two-Level Replacement Decisions in Paging Stores
,
1983,
IEEE Transactions on Computers.
[6]
A. Inkeri Verkamo.
Empirical Results on Locality in Database Referencing
,
1985,
SIGMETRICS.
[7]
Gururaj S. Rao,et al.
Performance Analysis of Cache Memories
,
1978,
JACM.
[8]
Bennett Fox,et al.
Discrete Optimization Via Marginal Analysis
,
1966
.
[9]
Philippe Flajolet,et al.
Birthday Paradox, Coupon Collectors, Caching Algorithms and Self-Organizing Search
,
1992,
Discret. Appl. Math..
[10]
Yakov A. Kogan,et al.
Some Results on Distribution-Free Analysis of Paging Algorithms
,
1976,
IEEE Transactions on Computers.
[11]
Peter A. Franaszek,et al.
Some Distribution-Free Aspects of Paging Algorithm Performance
,
1974,
JACM.
[12]
James Z. Teng,et al.
Managing IBM Database 2 Buffers to Maximize Performance
,
1984,
IBM Syst. J..
[13]
Giovanni Maria Sacco.
Index Access with a Finite Buffer
,
1987,
VLDB.