You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the build size is larger than the cache size the LRU policy results in many misses: the targets about to be rebuild are the oldest ones, and therefore most likely to be evicted.
In this scenario (aka sequential scan) LRU is the worst strategy, with zero hits. A trivial strategy that performs better is random replacement: just evict a random item. Another imho interesting class are strategies that count the number of hits (least frequently used, etc).
My understanding is that sccache is designed with the intention that you can adjust your cache to easily be at least integer factors larger than your build, if not orders of magnitude larger. Any situation where your cache can't be that large is not really interesting to sccache.
LRU can still be pathologically bad, of course, but I don't think we're interested in exploring alternative cache eviction policies.
Activity
luser commentedon Aug 26, 2019
If the build size is larger than the cache size then I don't think any eviction policy is going to result in a good time.
recmo commentedon Aug 26, 2019
In this scenario (aka sequential scan) LRU is the worst strategy, with zero hits. A trivial strategy that performs better is random replacement: just evict a random item. Another imho interesting class are strategies that count the number of hits (least frequently used, etc).
froydnj commentedon Aug 26, 2019
My understanding is that
sccacheis designed with the intention that you can adjust your cache to easily be at least integer factors larger than your build, if not orders of magnitude larger. Any situation where your cache can't be that large is not really interesting to sccache.LRU can still be pathologically bad, of course, but I don't think we're interested in exploring alternative cache eviction policies.
perf(ci): one compile cache for the machine's runner instances (#540)