4 ms·
So basically this is the inverse of swap. Using memory to make disk reads/writes faster, instead of using disk to make more memory. If Linux is consistently do
by jvdh 13y ago
So basically this is the inverse of swap. Using memory to make disk reads/writes faster, instead of using disk to make more memory.
If Linux is consistently doing this, why would you still need a swap partition?
- ableal 13y ago> why would you still need a swap partition? You don't, but if something decides to grab memory, the OOM-killer will kill processes abruptly. Swap may allow the system to limp along until there's some solution. It's not like 10 or 20GB HD these days matter much either.
- perlgeek 13y agoThough of course some people prefer the OOM-killer to kick in fast instead of the whole system being unresponsive for about an hour or so. That's why my desktop and laptop systems don't have swap enabled.
- rosser 13y agoWould you rather consume physical pages of RAM by storing less recently used programs and data, or by caching more recently used disk pages? Myself, I'd generally prefer to evict the older stuff to swap in order to cache the newer stuff. But maybe that's just me.
- ableal 13y agoQuite a while ago, HP-UX (v9, if memory serves) got this balance wrong - the system was keeping files in RAM, and kicking active processes to swap. Much gnashing of teeth ensued until HP fixed that ...
- Tuna-Fish 13y agoBecause you can (and usually do) have areas of memory and disk that are more or less active, meaning it can make sense to evict some ram pages to disk while still caching other disk pages.
- njharman 13y ago> why would you still need a swap partition? Because sometimes you (read applications) need to use all/most of your memory. Ability to swap out all the not being used memory to disk maximizes amount of memory available to applications.
- lmm 13y agoYou don't. Get rid of it. I've been running without swap for five years now. (Note that suspend-to-disk requires a swap partition though)