![](https://possumpat.io/pictrs/image/20de44a2-cc93-4368-b646-16a8f34b6f28.png)
![](https://beehaw.org/pictrs/image/bcae6839-244a-4162-a988-42ee46909013.png)
You have to enjoy a hobby in itself, if you’re too focused on results then you’ll have problems with the gulf between your ability and your aspiration. Is there anything you’ve tried doing that you just enjoy doing? Like do you just enjoy banging on a piano or drawing or writing, regardless of the output?
I think it’s better to think about what swap is, and the right answer might well be zero. If you try to allocate memory and there isn’t any available, then existing stuff in memory is transferred to the swap file/partition. This is incredibly slow. If there isn’t enough memory or swap available, then at least one process (one hopes the one that made the unfulfillable request for memory) is killed.
If you ever do start swapping memory to disk, your computer will grind to a halt.
Maybe someone will disagree with me, and if someone does I’m curious why, but unless you’re in some sort of very high memory utilization situation, processes being killed is probably easier to deal with than the huge delays caused by swapping.
Edit: Didn’t notice what community this was. Since it’s a webserver, the answer requires some understanding of utilization. You might want to look into swap files rather than swap partitions, since I’m pretty sure they’re easier to resize as conditions change.