Do I need Swap memory?

I do have Swap memory now, no need to be worried until next time i need to reboot, but i don’t need to reboot everyday so no need be worried. Because I little bit scare to edit my /fstab and insert /swapfile swap swap sw 0 0
But the first part was so easy, if needed to reboot I can install Swap memory again easy 👍
 

Attachments

  • 903CEF6E-A3A6-4ECB-BC3C-81B20953792F.jpeg
    903CEF6E-A3A6-4ECB-BC3C-81B20953792F.jpeg
    140.4 KB · Views: 18
If you reboot the only thing you have to do is
Code:
swapon /swapfile

Assuming that /swapfile is the actual file you previously created.
 
I dig follow this

If you reboot the only thing you have to do is
Code:
swapon /swapfile

Assuming that /swapfile is the actual file you previously created.

I did insert this command in my terminal

dd if=/dev/zero of=/swapfile count=4096 bs=1MiB
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

Do you mean I only need to insert this command now if I reboot?
swapon /swapfile
 
dd if=/dev/zero of=/swapfile count=4096 bs=1MiB
chmod 600 /swapfile
mkswap /swapfile

These items do not need to be done again. They survive the reboot. The file still exists along with the permissions and the file is of type "swap." After a reboot just "swapon /swapfile."
 
I have learn so much here in this forum. Thank you everyone that helped me out.
 
OOM Killer will not necessarily keep the server from crashing. There have been plenty of times I had a server stop responding even though OOM Killer had killed stuff. The only thing I could do was power cycle it. I couldn't even login through the console. I saw plenty of stuff being killed by OOM Killer on the screen. It still crashed.
With very little memory it's always possible to have OOM kill important processes (sshd e.g.), but I have never seen anything other than apache of mysql getting killed on 4GB+ servers. But you do have some control about what processes it kills and what not by manipulating soms /proc/ settings.
 
I am not going to argue with you over what what I have personally experienced.
 
I am not going to argue with you over what what I have personally experienced.
I have no intention to argue about anything with you. But it would be stupid to implement something in the kernel that would crash your server when it's supposed to prevent crashing and keep it in there for years. Anyway, have a nice day.
 
But it would be stupid to implement something in the kernel that would crash your server
I never said OOM Killer would crash the server. I am saying that may not prevent it from crashing. Certainly it helps. But I have seen a server crash anyway despite OOM Killer stopping processes.
 
If you reboot the only thing you have to do is
Code:
swapon /swapfile

Assuming that /swapfile is the actual file you previously created.
I had a reboot and this swapon /swapfile did work fine to get it working again.
 
Back
Top