Hacker News new | past | comments | ask | show | jobs | submit login

Why is it that an infinite sized cache has < 100% hit ratio?



A hit is defined as the event of "the thing I requested was in the cache". Assuming you have already put as many items as you can in your cache, with an infinite sized cache, everything will fit in the cache, so you will never have an occurrence of the event "the thing I requested was not in the cache", giving you a P(hit) of 1.

Of course, this ignores cache invalidation, population and I'm sure some other fun problems Facebook get to deal with.


Presumably they are imaging an infinite sized cache but it starts off empty. In their test trace, only 85% of the requests are for files that are ever accessed more than once, so the other 15% can never be a cache hit.


Because of compulsory misses -- i.e., the first request to an object is never in the cache.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: