logoalt Hacker News

alex_hirneryesterday at 7:45 PM2 repliesview on HN

What are your thoughts on eviction, re how easy to add some basic policy?


Replies

russellthehippoyesterday at 7:58 PM

Great question. I have some eviction functions in the Rust library; I don’t expose them through the extension/VFS yet. The open question is less “can I evict?” and more “when should eviction fire?” via user action, via policy, or both.

The obvious policy-driven versions are things like:

- when cache size crosses a limit

- on checkpoint

- every N writes (kind of like autocheckpoint)

- after some idle / age threshold

My instinct is that for the workload I care about, the best answer is probably hybrid. The VFS should have a tier-aware policy internally that users can configure with separate policies for interior/index/data pages. But the user/application may still be in the best position to say “this tenant/session DB is cold now, evict aggressively.”

russellthehippoyesterday at 8:35 PM

Also it’s super easy to add them, it’s definitely on the roadmap. The manifest tracks the data locally and could quickly evict on any operation that accesses it. Very safe post-checkpoint