Re: Question about RamCacheLRU

2012-12-29 Thread Yunkai Zhang
On Sun, Dec 30, 2012 at 12:17 PM, John Plevyak wrote: > Lol, If they have optimized it by removing the LRU nature, it was perhaps > overzealous, or perhaps your workload is such that it fits within the RAM > cache so replacement is not an issue. Without the LRU there are > approximately the same

Re: Question about RamCacheLRU

2012-12-29 Thread John Plevyak
Lol, If they have optimized it by removing the LRU nature, it was perhaps overzealous, or perhaps your workload is such that it fits within the RAM cache so replacement is not an issue. Without the LRU there are approximately the same number of buckets as objects, so replacement based on bucket wo

Re: Question about RamCacheLRU

2012-12-29 Thread Yunkai Zhang
On Sun, Dec 30, 2012 at 1:57 AM, John Plevyak wrote: > This code in ::put() implements the LRU, and as you can see, it uses the > LRU data structure (i.e. simple list from most recently used to least): > > while (bytes > max_bytes) { > RamCacheLRUEntry *ee = lru.dequeue(); > if (ee) >

Re: How disk storage is implemented

2012-12-29 Thread James Peach
On 23/12/2012, at 12:10 PM, John Plevyak wrote: > I added a bit of a design document. > > https://cwiki.apache.org/confluence/display/TS/DiskStorageLayout > > I didn't include anything about how the initial CacheKey is generated > because that is a function of HTTP (i.e. what does actually cons

Re: Question about RamCacheLRU

2012-12-29 Thread John Plevyak
This code in ::put() implements the LRU, and as you can see, it uses the LRU data structure (i.e. simple list from most recently used to least): while (bytes > max_bytes) { RamCacheLRUEntry *ee = lru.dequeue(); if (ee) remove(ee); else break; } On Sat, Dec 29, 2012 a