$ -weight: 600;">sudo fallocate -l 5G /swapfile
-weight: 600;">sudo fallocate -l 5G /swapfile
-weight: 600;">sudo fallocate -l 5G /swapfile
-weight: 600;">sudo dd if=/dev/zero of=/swapfile bs=1M count=5120
-weight: 600;">sudo dd if=/dev/zero of=/swapfile bs=1M count=5120
-weight: 600;">sudo dd if=/dev/zero of=/swapfile bs=1M count=5120
-weight: 600;">sudo chmod 600 /swapfile
-weight: 600;">sudo chmod 600 /swapfile
-weight: 600;">sudo chmod 600 /swapfile
-weight: 600;">sudo mkswap /swapfile
-weight: 600;">sudo mkswap /swapfile
-weight: 600;">sudo mkswap /swapfile
Setting up swapspace version 1, size = 5 GiB (5368705024 bytes)
no label, UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Setting up swapspace version 1, size = 5 GiB (5368705024 bytes)
no label, UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Setting up swapspace version 1, size = 5 GiB (5368705024 bytes)
no label, UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-weight: 600;">sudo swapon /swapfile
-weight: 600;">sudo swapon /swapfile
-weight: 600;">sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | -weight: 600;">sudo tee -a /etc/fstab
echo '/swapfile none swap sw 0 0' | -weight: 600;">sudo tee -a /etc/fstab
echo '/swapfile none swap sw 0 0' | -weight: 600;">sudo tee -a /etc/fstab
total used free shared buff/cache available
Mem: 7.5Gi 3.2Gi 1.1Gi 512Mi 3.2Gi 3.6Gi
Swap: 5.0Gi 0B 5.0Gi
total used free shared buff/cache available
Mem: 7.5Gi 3.2Gi 1.1Gi 512Mi 3.2Gi 3.6Gi
Swap: 5.0Gi 0B 5.0Gi
total used free shared buff/cache available
Mem: 7.5Gi 3.2Gi 1.1Gi 512Mi 3.2Gi 3.6Gi
Swap: 5.0Gi 0B 5.0Gi
cat /proc/sys/vm/swappiness
cat /proc/sys/vm/swappiness
cat /proc/sys/vm/swappiness
-weight: 600;">sudo sysctl vm.swappiness=10
-weight: 600;">sudo sysctl vm.swappiness=10
-weight: 600;">sudo sysctl vm.swappiness=10
echo 'vm.swappiness=10' | -weight: 600;">sudo tee -a /etc/sysctl.conf
echo 'vm.swappiness=10' | -weight: 600;">sudo tee -a /etc/sysctl.conf
echo 'vm.swappiness=10' | -weight: 600;">sudo tee -a /etc/sysctl.conf
# 1. Create
-weight: 600;">sudo fallocate -l 5G /swapfile # 2. Secure
-weight: 600;">sudo chmod 600 /swapfile # 3. Format
-weight: 600;">sudo mkswap /swapfile # 4. Enable
-weight: 600;">sudo swapon /swapfile # 5. Persist
echo '/swapfile none swap sw 0 0' | -weight: 600;">sudo tee -a /etc/fstab # 6. Verify
free -h # Bonus: tune swappiness
-weight: 600;">sudo sysctl vm.swappiness=10
echo 'vm.swappiness=10' | -weight: 600;">sudo tee -a /etc/sysctl.conf
# 1. Create
-weight: 600;">sudo fallocate -l 5G /swapfile # 2. Secure
-weight: 600;">sudo chmod 600 /swapfile # 3. Format
-weight: 600;">sudo mkswap /swapfile # 4. Enable
-weight: 600;">sudo swapon /swapfile # 5. Persist
echo '/swapfile none swap sw 0 0' | -weight: 600;">sudo tee -a /etc/fstab # 6. Verify
free -h # Bonus: tune swappiness
-weight: 600;">sudo sysctl vm.swappiness=10
echo 'vm.swappiness=10' | -weight: 600;">sudo tee -a /etc/sysctl.conf
# 1. Create
-weight: 600;">sudo fallocate -l 5G /swapfile # 2. Secure
-weight: 600;">sudo chmod 600 /swapfile # 3. Format
-weight: 600;">sudo mkswap /swapfile # 4. Enable
-weight: 600;">sudo swapon /swapfile # 5. Persist
echo '/swapfile none swap sw 0 0' | -weight: 600;">sudo tee -a /etc/fstab # 6. Verify
free -h # Bonus: tune swappiness
-weight: 600;">sudo sysctl vm.swappiness=10
echo 'vm.swappiness=10' | -weight: 600;">sudo tee -a /etc/sysctl.conf