3 ms·
It's not the swapfile that's the issue it's having the swapfile also be used for virtual memory. If it was only used for suspend that would be fine because it
by Lio 7y ago
It's not the swapfile that's the issue it's having the swapfile also be used for virtual memory.
If it was only used for suspend that would be fine because it would only be written to when you suspend the laptop, which in the grand scheme of things is pretty rare compared to writes caused by virtual memory swapping.
- chungus_khan 7y agoMac OS does the same in this regard though, but in my experience neither Mac OS or Linux are particularly aggressive at using swap anyway.
- seba_dos1 7y agoYup, macOS dynamically allocates swap files on disk when they're needed - that's why you may see 0 swap space in htop, which doesn't mean that it doesn't use swap.
- Lio 7y agoThat’s interesting. I wonder can Linux be persuaded to dynamically alter the swap space from 0 as part of the suspend script?
- chungus_khan 7y agoI think if you were to use a swapfile and set swappiness to zero it should behave like this.
- Lio 7y agoBrilliant! I think this is the going to be the answer. Have the swapfile but use swappiness to tell the kernel not to use it day to day. Thank you :D