
specifically to work in a database-specific
environment, and have more complex behaviour that
the other existing policies in the policy pool. The
respective release mechanisms for each of the six
policies that have been added as part of ACME-DB
will now be described.
LIRS. This policy is described in (Jiang and
Zhang, 2002). In the case of uncaching a page from
the buffer, the page at the front of the List Q queue
is ejected, creating space for a new page in the
buffer pool. However, when releasing the page
arbitrarily some other factors need to be taken into
account.
(i) In the case that the page to be released
exists in List Q, that is, the page is a resident HIR
page, the page is released from List Q (wherever in
the queue it may be). This case is identical to the
case of uncaching, except that instead of replacing
the page at the front of the queue, any page in the
queue could be potentially replaced.
(ii) In the case that the page to be replaced
exists in the LIR page set, that is, the page is an LIR
page, the page is released from the LIR page set.
This creates a space in the LIR page set, which
needs to be filled in before normal caching /
uncaching processes can proceed on the buffers. The
space in the LIR page set is filled by ejecting the
resident HIR page at the tail of List Q, and pushed
onto the top of the LIR page set (the implementation
employs a LIR page set to hold LIR pages). If this
page was not in Stack S, it is pushed onto Stack S,
and flagged as a resident LIR page.
The release mechanism is designed in this
manner because it is presumed that the HIR page at
the tail of List Q is the HIR page that had the least
recency out of all the other resident HIR pages. In
releasing one of the LIR pages from the LIR page
set, it is considered that the HIR page in List Q with
the least recency should be added to the LIR page
set to fill the space left by the released page. Due to
the fact that a resident HIR page is therefore turned
into an LIR page, it needs to be added to Stack S, if
it is not already there, and flagged as a resident LIR
page. (Note: All pages are flagged as either resident
or non-resident in the implementation).
LRFU. This policy is described in (Lee et al.,
1999). The release mechanism in this case simply
removes the page from the priority queue.
LRU-K. This policy is described in (O’Neil et
al., 1993). The release mechanism in this case
simply removes the page from the priority queue.
SFIFO. This policy is described in (Turner and
Levy, 1981). The release mechanism in this policy
checks the primary buffer for the page to be
released, and releases it from there if found. If not,
then the secondary buffer is checked for the page to
be released, and is released from there. The release
mechanism design in this policy reflects the fact that
pages are not cached to the secondary buffer until
the primary buffer is full, thereby enabling the
arbitrary removal of pages from either buffer.
2Q. This policy is described in (Johnson and
Shasha, 1994). The release mechanism in this policy
checks to see whether the page to be released exists
in the Am buffer, and releases it from there if found.
If not, then the page to be released is searched for in
the A1in buffer, and released from there if found.
The release mechanism was designed in this manner
so that the sizes of each of the A1in and A1out
buffers are checked when uncaching occurs, thereby
enabling the arbitrary release of a page from either
the Am or A1in buffer.
W
2
R. This policy is described in (Jeon and Noh,
1998). The release mechanism in this policy checks
the Weighing Room buffer for the page to be
released, and releases it from there if found. If not,
the Waiting Room buffer is checked for the page to
be released, and is released from there. The
Weighing Room is implemented as a simple LRU
queue, and the Waiting Room as a FIFO queue,
enabling the simple arbitrary removal of a page from
either queue, without needing any extra queue
adjustments.
5 EVALUATION
This section describes the evaluation environment
for which ACME-DB was implemented, the
methodology used to design the experiments, the
results of those experiments, and an analysis of the
results.
5.1 Evaluation environment and
traces
The ACME-DB simulation was implemented using
C++, compiled and tested on Microsoft Windows
XP, Linux RedHat 6.2 and Linux Debian. The
execution time tests were performed on a Pentium
IV 2GHz PC with 256 MB of RAM.
Two traces were used to simulate request
streams. These traces are the DB2 and OLTP (On-
Line Transaction Processing) traces used by Jeon
and Noh (Jeon and Noh, 1998), Johnson and Sasha
(Johnson and Shasha, 1994) and by O’Neil et al.
(O’Neil et al., 1993). The DB2 trace was originally
obtained by running a DB2 commercial application
and contains 500,000 page requests to 75,514
distinct pages. The OLTP trace contains records of
page requests to a CODASYL database for a
ACME-DB: AN ADAPTIVE CACHING MECHANISM USING MULTIPLE EXPERTS FOR DATABASE BUFFERS
195