I upgraded from Debian 10 to 12 (going through 10->11->12), and I noticed that on my server (with 2GB of RAM) i get mysql OOM kills from time to time (In Debian 10 I did not have any issue with OOM). I am planning to add more RAM (it is a Virtual Private Server in the cloud) but I also noticed that by default Debian has not created a swap partition/file:
free -h
total used free shared buff/cache available
Mem: 1.9Gi 804Mi 139Mi 6.0Mi 1.1Gi 1.1Gi
Swap: 0B 0B 0B
I have other servers with Ubuntu and the swap allocation was defined by default (I do not recall adding it). This is not the default for Debian?
Now I am willing to add the swap, but most of the tutorials I found create a swap file, while the partition is the recommendation. Can you guys give some instructions on how to create the swap partition, and what should be the size (my SDD has 40GB)?.
Thanks