I've been experiencing an issue with the sync::Cache where it will evict cache entries when the cache is not yet full, the hot_allocation parameter is set very low (<= 0.05), and the cache_shards are set to any number >1. The issue appears to stem from having multiple cache shards as I cannot reproduce it with only 1 shard.
My workload has a high bias towards recency and thus I have set the hot_allocation parameter very low, usually < 0.05. I have tried multiple ghost_allocation values ([0.01, 0.5]), and that does not appear to cause the issue. The issue does not happen every time when the cache shards are set to > 1 (or default/left unset), but it happens enough that I see significant performance penalties for re-fetching evicted data.
If desirable, I can put together a reproduction of the issue and add it here.
I've been experiencing an issue with the
sync::Cachewhere it will evict cache entries when the cache is not yet full, thehot_allocationparameter is set very low (<= 0.05), and thecache_shardsare set to any number >1. The issue appears to stem from having multiple cache shards as I cannot reproduce it with only 1 shard.My workload has a high bias towards recency and thus I have set the
hot_allocationparameter very low, usually < 0.05. I have tried multipleghost_allocationvalues ([0.01, 0.5]), and that does not appear to cause the issue. The issue does not happen every time when the cache shards are set to > 1 (or default/left unset), but it happens enough that I see significant performance penalties for re-fetching evicted data.If desirable, I can put together a reproduction of the issue and add it here.