Close the swap space of the Linux server

Backup /etc/fstab

cp /etc/fstab /tmp/fstab.`date +%F`

Delete the swap mount item in /etc/fstab

vim /etc/fstab

Delete the line with swap

Close all swap

swapoff -a

Observe the recovery of the process after using swap and swapoff -a. For processes that cannot recover swap, you need to schedule a time to restart

an examination:

free -m # 应该 Swap 这一行显示全是 0

Guess you like

Origin blog.csdn.net/weixin_39445556/article/details/109225084