3 ms·
"How would you implement a swap on such a filesystem? You couldn't, could you?" The days of "swap" are numbered. The future is a smart memory hierarchy that us
by jerf 17y ago
"How would you implement a swap on such a filesystem? You couldn't, could you?"
The days of "swap" are numbered. The future is a smart memory hierarchy that uses knowledge about size/speed tradeoffs to make smart decisions about where to store things, but that won't look much like "swap".
Even with SSDs, it has become very unusual for "the system is currently swapping" to mean anything other than "the system's performance characteristics just became completely unacceptable". I stopped using a swap partition somewhere around 512MB to 1GB, and now my laptop that I didn't even try to max out the memory on shipped with 4GB. I can't hardly even fill up the cached buffers in 4GB in any reasonable period of time.
(Please note the difference between "very unusual" and "never". In fact, I can cite a server in my care that benefits from using a bit of swap. But that server is the exception, not the rule.)
- jongraehl 17y agoWe'll still have swap as long as CPUs support virtual memory. Nothing beats using a dumb programming language and process model, and without explicitly deciding anything, being able to scale past physical memory until your working set just barely fits. Further, there may be some performance benefit to swapping idle process memory to make room for more buffer cache. It's true that for interactive use (especially a laptop with spun-down drives), you may be happy without swap. But I don't see the facility being mothballed.