Juiceman wrote: >>> the 50:50 >>> split seems pretty arbitrary; it should be configurable. >> Why, so each user can choose a different arbitrary value instead of >> everyone using the same arbitrary value? >> > > Well, I for one, would like to be a "deep cache" for long term > storage, others like Bob would like to cache as much as possible > immediately. I think Freenet could benefit from this.
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 way we don't waste any space while the store is filling up (the cache uses the free space), and if we later change the quotas it will gradually move to the new quotas instead of having to resize the whole thing at once. On a related note, is there any evidence that LRU performs better than, say, random replacement for Freenet's purposes? IIRC there's some evidence that LRU in a distributed cache produces too many copies of popular data: http://www.cs.princeton.edu/~qlv/download/searchp2p_ics02.pdf http://gnunet.org/papers/p2pmulti.pdf Cheers, Michael
