jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <asm...@yahoo.com>
Subject Re: new disk cache fixed block size model suggestion
Date Mon, 21 Aug 2006 12:52:50 GMT


--- Hanson Char <hanson.char@gmail.com> wrote:

> >It would simply be a list of positions.  No
> > size data is needed, since all the blocks are the
> same
> > size.
> 
> If an item fits in a block, but has a size smaller
> than the block
> size, you still need to record the size data.  What
> am I missing here
> ?

Right now the recycle bin holds the length of the item
on disk.  Originally the length of the item was only
stored on disk, in the first 4 bytes of the record. 
Now (and for some time I think) the length is stored
along with the key and position in memory so it can be
used in the recycle bin.  This makes the length on
disk redundant.  The alternative would be to look up
the length when an item is removed and then store this
in the recylce bin.  This might be preferable, since
the overall memory usage would be 4 bytes lower per
entry. . . .

In the block model, the recycle bin no longer needs
the size, since all blocks are the same size.  You
still need to store the actual length of the item on
disk, but it would not be redundant.

Aaron

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


Mime
View raw message