
In all our experiments, we tried to represent LRU/2 as fairly as possible,
but it was difficult to make the tunables correct. 
The LRU/2
algorithm keeps a page in the buffer for a grace period
and considers a second access to be a legitimate second access
only if it arrived after a certain minimum time interval from the first access.
We simulated these tunables as follows.
{\em Ted: please fill in, saying how we approximated these tunables.}

\subsection{Simulation Experiments}

The experiments in this subsection are from artificially generated traces.
They give some intuition about the behavior of LRU, LRU/2, and 2Q,
but do not necessarily represent a  real application's behavior.

{\bf Zipf Distributions}

These two figures compare the performance of LRU, LRU/2, and 2Q on a 
Zipf input distribution with parameter 0.5 and 0.8 respectively.
{\em Ted: Please give a parenthetic remark, saying what each of these 
represent}
We include an algorithm called A0.
If B is the number of page slots in the buffer, then
A0 is the algorithm that places the B-1 hottest items in B-1 pages,
and uses the last page to handle misses.
{\em Ted: Say how you computed A0 --- how do you know which
are the B-1 hottest items?} 
A0 is the optimal algorithm so provides an upper bound on the performance
of any online algorithm for this distribution.
[ref:
@book{CD73,
author={E.G. Coffamn and P.J. Denning},
title={Operating System Theory},
publisher={Prentice-Hall},
year=1973
}
]

\begin{figure}
\vspace{3.8in}
\special{psfile=zalgcp5.eps  hscale=60 vscale=60 hoffset=0 voffset=-40}
\caption{Zipf input comparison with parameter 0.5}
\label{vinsert.fig}
\end{figure}

\begin{figure}
\vspace{3.8in}
\special{psfile=zalgcp8.eps  hscale=60 vscale=60 hoffset=0 voffset=-40}
\caption{Zipf input comparison with parameter 0.8}
\label{vinsert.fig}
\end{figure}


{\bf Mixed Zipf/Scans

These figures represent experiments where 1/3 of the references
are scans (so one expects a zero hit ratio for these).
The remaining references follow a Zipf distribution with parameters
0.5 or 0.8 respectively.
{\em Ted: Please say how you set A1in and A1out.} 

\begin{figure}
\vspace{3.8in}
\special{psfile=scan10_5.eps  hscale=60 vscale=60 hoffset=0 voffset=-40}
\caption{1/3 Scan Input Mixed with Zipf Input Having Parameter 0.5 }
\label{vinsert.fig}
\end{figure}

\begin{figure}
\vspace{3.8in}
\special{psfile=scan10_8.eps  hscale=60 vscale=60 hoffset=0 voffset=-40}
\caption{1/3 Scan Input Mixed with Zipf Input Having Parameter 0.8 }
\label{vinsert.fig}
\end{figure}


{\bf Online Transaction Processing-style Index Accesses}

A nice observation of the LRU/2 paper is that randomly accessed
data pages get an excessively high priority within the buffer.
They posited an example where there are 100 index pages
and 1000 data pages.
{\em Ted: How big is the buffer?}
They then showed that LRU/2 gives priority to the index pages
as it should.
This figure shows that 2Q does so as well.
{\em Ted: Please say how you set A1in and A1out.} 

\begin{figure}
\vspace{3.8in}
\special{psfile=twopool.eps  hscale=60 vscale=60 hoffset=0 voffset=-40}
\caption{Behavior of Algorithms on Index Accesses to Data Pages}
\label{vinsert.fig}
\end{figure}

\subsection{Experiments on Real Data}

Colleagues at IBM and UNIX System Laboratories
kindly supplied traces of a database application and of hits
on program text, respectively.\footnote{
We attempted to obtain the Swiss Bank traces used in the LRU/2 paper,
but Gerhard Weikum informed us that the bank considers these to be secret.}
For these experiments A1in and A1out were set to the following values
{\em Ted: Please fill in }.
We arrived at these settings based on the simulation studies
described in the next section. 
Since the differences among the various algorithms sometimes fall
below 5\% we represent these results with tables.

{\bf Trace Data from a DB2 Commercial Application}

{\em Ted: Please give table and any other relevant parameters}

{\bf Trace Data from Program Text Accesses of a Windowing Application}

{\em Ted: Please give table and any other relevant parameters}

\section{Setting the Parameters}

Recall that the 2Q algorithm has a queue called Am for pages hit
at least two and possibly more times, a queue A1in that stores pages
that have been hit only once (in recent memory), 
and a queue A1out that stores records
of pages that have been hit only once but not the pages themselves. 
To gain intuition about these schemes, we performed the following 
experiments.

{\bf The Size of A1in}

For Zipf distributions, a small A1in helps. ??

\begin{figure}
\vspace{3.8in}
\special{psfile=irlg5-2q.eps  hscale=60 vscale=60 hoffset=0 voffset=-40}
\caption{The Effect of the Size of A1in on the Hit Rate, assuming Zipf 0.5}
\label{vinsert.fig}
\end{figure}

\begin{figure}
\vspace{3.8in}
\special{psfile=irlg8-2q.eps  hscale=60 vscale=60 hoffset=0 voffset=-40}
\caption{The Effect of the Size of A1in on the Hit Rate, assuming Zipf 0.8}
\label{vinsert.fig}
\end{figure}

{\bf Responsiveness}

To investiate the responsiveness of this algorithm
to changes in locality, we ran the algorithms for
1,000,000 zipf references, then made a random permutation of the
probabilities assigned to the items (thus affecting a change in locality).
This chart shows hit rates as a function of time after the permutation.
The larger A1in is the better the responsiveness up to
|A1in| = |AM|/2.
{\em Ted: ??? A1in or A1out --- can we get responsiveness from A1out}
We include LRU/2 as a benchmark against which to judge responsiveness
(LRU/2 is quite responsive).

\begin{figure}
\vspace{3.8in}
\special{psfile=lc5_20.eps  hscale=60 vscale=60 hoffset=0 voffset=-40}
\caption{Responsiveness and the Size of A1, with Zipf 0.5}
\label{vinsert.fig}
\end{figure}

\begin{figure}
\vspace{3.8in}
\special{psfile=lc8_20.eps  hscale=60 vscale=60 hoffset=0 voffset=-40}
\caption{Responsiveness and the Size of A1, with Zipf 0.8}
\label{vinsert.fig}
\end{figure}

{\em Ted: Please present conclusions about parameter settings and then
give whatever theoretical justification you can}
