4 ms·
> There already is one: memory with swap. Actually, there's already two. The other one: just read from disk (and let OS manage caches).
by hamandcheese 1y ago
> There already is one: memory with swap.
Actually, there's already two. The other one: just read from disk (and let OS manage caches).
- cowsandmilk 1y agoI prefer this abstraction as it is more widely supported (I’ve had to deploy to hosts that intentionally kill when you swap) and results in development assuming that the access may be at disk speed. When you rely on swap, I often see developers assuming everything is accessible at memory speed and then surprised when swap causes sudden degradation.
- rockwotj 1y agoYeah I mean if you have a latency sensitive workload, you don’t want page faults and swapping to give hidden latency spikes - it kills your P99 latencies
- jitl 1y agoYeah but you can pin important pages in RAM with mlock family of syscalls and friends like move_pages for explicit page management. This is what materialize does as far as I understand it.