centos close the swap partition

The first step to close the swap partition:
swapoff -a

second step to modify the configuration file - / etc / fstab
delete swap related rows / mnt / swap swap swap defaults 0 0 comment out this line or that line

The third step is to confirm swap has been shut down
free -m

 If the swap line shows zero indicates a successful close

The fourth step adjustment swappiness parameter
echo 0> / proc / sys / vm / swappiness # provisional entry into force

permanent vim /etc/sysctl.conf #
# modified to modify vm.swappiness 0
vm.swappiness = 0
sysctl -p # validate the configuration
----------------
Original link: https://blog.csdn.net/dejunyang/article/details/97972399

Guess you like

Origin www.cnblogs.com/larrypeng/p/11950498.html