Everyone defending swap like crazy in the comments… so let me give a counter argument specifically for desktop:
Many years ago I stopped using swap on all my computers (I exclusively use linux) and the reason is: every time anything regarding interactivity went to swap, my system would freeze and literally become unusable for a really long time until I killed something. Since I got tired if that behaviour I decided I prefer for random shit to die but my computer still be usable.
It wasn’t very often, but I don’t get OOM killer often either (as in I don’t remember the last time it happened and I use linux every day for both work and fun), and the freezing situation was way more annoying, to the point I sometimes ended up cold switching off the computer. I’m surprised on how many people run out of memory constantly. I guess you all are just using linux for servers and have crazy processing of infinite data…
yep it was HDD, but with the low amount of times I have any OOM issue, I’m way more worried about NVMe flash burning than a random process being killed once every blue moon.
In fact I didn’t mention, but since the advent of flash drives what I’ve done is trying to locate heavy disk writing apps and find alternatives for them, amid disabling many logs.
For swap, it hunts me to think some automatic process I don’t have control over will burn those sweet erase cycles without me noticing just because someone programmed it poorly. I’m way more happy knowing I have some control over it.
Everyone defending swap like crazy in the comments… so let me give a counter argument specifically for desktop:
Many years ago I stopped using swap on all my computers (I exclusively use linux) and the reason is: every time anything regarding interactivity went to swap, my system would freeze and literally become unusable for a really long time until I killed something. Since I got tired if that behaviour I decided I prefer for random shit to die but my computer still be usable.
It wasn’t very often, but I don’t get OOM killer often either (as in I don’t remember the last time it happened and I use linux every day for both work and fun), and the freezing situation was way more annoying, to the point I sometimes ended up cold switching off the computer. I’m surprised on how many people run out of memory constantly. I guess you all are just using linux for servers and have crazy processing of infinite data…
Were you using a HDD for swap? It’s nearly unnoticeable on an NVMe drive.
yep it was HDD, but with the low amount of times I have any OOM issue, I’m way more worried about NVMe flash burning than a random process being killed once every blue moon.
In fact I didn’t mention, but since the advent of flash drives what I’ve done is trying to locate heavy disk writing apps and find alternatives for them, amid disabling many logs.
For swap, it hunts me to think some automatic process I don’t have control over will burn those sweet erase cycles without me noticing just because someone programmed it poorly. I’m way more happy knowing I have some control over it.
Or shotcut. I once ran it on 8GB, minimal arch with no swap. Well.
And I’m not even trying to build android on my new relatively modern laptop. It won’t work.