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
We need memory-efficient, CPU-efficient ways of caching large numbers of event keys so that we do not re-transmit the same things more than once (ideally.) However, as mentioned, we have limited memory so we'd like to evict things that aren't recently hot. A Cuckoo filter would be the ideal candidate (it supports deletions, unlike Bloom) but what we really need is Cuckoo + LRU eviction. Any suggestions for a Cuckoo Rust library for starters? I see only one paper on Cuckoo + LRU, and no Rust code for it, and really I see only one Rust Cuckoo implementation.
I don't know how many bits would have to be added to each object for an LRU timer, but it would seem to me that this could be done very efficiently with just a few bits if you divide the memory space into "buckets" and just evict all the members of a bucket when capacity is reached instead of keeping timers/counts. You'd only need the number of bits in each object to match the bucket size. 5 bits, 32 buckets, etc. I'm sure someone more clever has reduced this even more significantly.
We would be open to developing this feature (and probably will) but guidance on easier/better paths is welcome.
Counter-point: we could just use a hash + LRU model, but that doesn't seem to be quite as memory-efficient as Cuckoo.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We need memory-efficient, CPU-efficient ways of caching large numbers of event keys so that we do not re-transmit the same things more than once (ideally.) However, as mentioned, we have limited memory so we'd like to evict things that aren't recently hot. A Cuckoo filter would be the ideal candidate (it supports deletions, unlike Bloom) but what we really need is Cuckoo + LRU eviction. Any suggestions for a Cuckoo Rust library for starters? I see only one paper on Cuckoo + LRU, and no Rust code for it, and really I see only one Rust Cuckoo implementation.
I don't know how many bits would have to be added to each object for an LRU timer, but it would seem to me that this could be done very efficiently with just a few bits if you divide the memory space into "buckets" and just evict all the members of a bucket when capacity is reached instead of keeping timers/counts. You'd only need the number of bits in each object to match the bucket size. 5 bits, 32 buckets, etc. I'm sure someone more clever has reduced this even more significantly.
We would be open to developing this feature (and probably will) but guidance on easier/better paths is welcome.
Counter-point: we could just use a hash + LRU model, but that doesn't seem to be quite as memory-efficient as Cuckoo.
References:
https://link.springer.com/article/10.1007/s10489-021-02567-0
https://github.com/axiomhq/rust-cuckoofilter
https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf
Beta Was this translation helpful? Give feedback.
All reactions