Re: memory-mapped files in Squid

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Tue, 26 Jan 1999 10:16:32 -0700 (MST)

On Tue, 26 Jan 1999, Andres Kroonmaa wrote:

> If you know how to solve the problem of noncontinous free space on a
> system that has random expiration of objects and without sacrifying
> some >20% of disk space for that, then its way cool. I'm all ears.
> I just can't think of a trivial way for that, and thats what I admit.

The trivial way is a "cyclic" approach. You always write at the current
pointer, incrementing it after write completes. You do not care if the
objects you overwrite expire or not. You do not have any garbage
collection. Just one huge FIFO disk-resident queue. Writes are always
continuous. Inter-object reads for small objects are continues.
Intra-object reads are random (but can be optimized with Scan or whatnot).

A non trivial (smart) part is to spend minimal efforts in maintaining
metadata and preserving "popular" objects. The latter may be needed to get
decent hit ratio. IMO, before coding any smartness into Squid, one has to
test it using simple trace-driven simulations because it is not obvious
how many/what objects have to be specially preserved on any decent size
FIFO queue.

Alex.
Received on Tue Jul 29 2003 - 13:15:56 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:02 MST