Re: Cache and Store

Juiceman <[email protected]>
Newsgroups gmane.network.freenet.technical
Message-ID <[email protected]>
On 5/9/07, Matthew Toseland <toad-EI5O+8PHWbJeeLb3ft/[email protected]> wrote:
> On Wednesday 09 May 2007 20:28, Bob Ham wrote:
> > On Wed, 2007-05-09 at 12:03 +0100, Michael Rogers wrote:
> > > Would it be possible to dynamically balance the amount of space
> > > allocated to the cache and store? Here's what I have in mind: when the
> > > cache is below its quota and a key is cached, remove the least recently
> > > used key from the store instead of the cache. And vice versa: when the
> > > store is below its quota and a key is stored, remove the least recently
> > > used key from the cache.
> >
> > That was what I proposed near the start of this thread.  I would note,
> > as well, that the store-shrinking code should already exist for cases
> > when the user reduces the configured size of the store.
> >
> > Bob
>
> It does, but as I have already stated at least once, it is difficult to
> efficiently do an online shrink while preserving the most recently used data.
>
> It is of course possible. One way to do it is to swap the key you'd be
> deleting with the least recently used key just before truncating.
>
> _______________________________________________
> Tech mailing list
> [email protected]
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/tech
>
>

This is not exactly what you are looking for but I am 90% finished
coding a config option to have the store and the cache be non-equal
and user configurable in size.  This could be changed manually as
often as you wished as your store filled up.

I was going to run it by the list after I had completed it.

This was something that I wanted to see if I could figure out how to
do (whether or not it gets merged into the codebase.)

-- 
I may disagree with what you have to say, but I shall defend, to the
death, your right to say it. - Voltaire
Those who would give up Liberty, to purchase temporary Safety, deserve
neither Liberty nor Safety. - Ben Franklin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.