On Oct 9, 2012, at 1:50 PM, Adam Barth <aba...@webkit.org> wrote:

> 
> That raises the question of what the cache-size to hit-rate curve
> looks like.  I don't think that's something we've ever measured for
> the MemoryCache, but it would be interesting to know, for example,
> whether increasing the cache size by 4% increases the cache hit rate
> by more or less than 4%.

My guess is that frequency of hits on given cache items approximately follows a 
power law distribution, and therefore increasing cache size gives diminishing 
returns. The question you raise is ceratainly an interesting one to study to 
determine the optimum cache size, and to revisit when improvements are made to 
cache efficiency.

But with respect to the proposed improvement under discussion:

If you imagine this as a curve with hit rate on the Y axis and cache size 
required to achieve that hit rate on the X axis, then the potential improvement 
under discussion would shift the curve down (assuming the 4% redundancy level 
holds across the typical user's working set). In economic terms, you can think 
of this as shifting the supply curve down (more hit rate can be supplied at any 
given cost in memory), rather than movement along the supply curve. Which is 
pretty good for you regardless of your demand curve (your willingness to pay 
memory use for cache hit rate).

Regards,
Maciej

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to