3 ms·
Code can almost always be paged out, even without a swap file, because it's memory mapped from files on disk. In fact running without swap makes this behaviour
by rcxdude 5y ago
Code can almost always be paged out, even without a swap file, because it's memory mapped from files on disk. In fact running without swap makes this behaviour worse (i.e. it happens sooner and more suddenly) because then the kernel can't prioritise keeping currently running code in memory over keeping rarely-accessed data in memory. In general you should have some swap and run with earlyoom if you want decent behaviour in a low-memory condition on linux.
- jleahy 5y agoGood point.