服务器增加虚拟内存

The server increases virtual memory.

free -h
df -h /

fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

echo ''/swapfile none swap sw 0 0'' >> /etc/fstab

sysctl vm.swappiness=20
echo ''vm.swappiness=20'' >> /etc/sysctl.conf

free -h
swapon --show
JavaScript

Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.