Swap is always recommended, here under a how to :
Yes that did work. Now I can se the file /fstab but maybe this is way to difficult for me. No idea how to add or save it.maybe you dont have vim in your system
yum install vim
should help
Yes nano is more user friendly.I personally find nano to be a more user friendly text editor.
Yes nano is more user friendly.
i wonder if anyone can show me how your /fstab look like if you have added
/swapfile swap swap sw 0 0
screenshot maybe?
I have my VPS at Digitalocean. Don’t think I have Swap there by default. If that was the case wouldn’t I have something in my /fstab ?I'm wondering how you got a server with 2GB ram installed without a swap partition, as it's pretty much always a standard setting. To skip swap, you'll have to use a custom disk partition layout, but I don't think you've done that because you don't know (yet) that you need it. So... kinda curious if this is default on CentOS 8.
Hmm, they have an interesting 'note' on https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps where they not recommend enabling swap on SSD products. Totally bogus reason tho.I have my VPS at Digitalocean. Don’t think I have Swap there by default. If that was the case wouldn’t I have something in my /fstab ?
Now, i also using 2GB RAM 4 CPU Core using SSDHi, I was wonder if I need to create an Swap memory on my Centos 8? Right now my server have 2gb of ram memory. Are there any easy step by step to set this up? And if needed how much Swap memory do I need?
The OOM will kill processes when you're out of memory. Even tho the server could crash, things like mysql, apache will die first, freeing memory again. Not the best way to go, but on the other hand, if you're server really needs swap (being 10-1000 times slower than SSD) crashing might be a matter of seconds.Swap is only needed if you don't have enough RAM. I have never allocated more than 512 MB for swap. If you don't have enough RAM and no swap the server could crash. There is a balance to be reached.
The OOM will kill processes when you're out of memory.