# List block devices and mount points
lsblk -o NAME,SIZE,TYPE,MOSQL,ROTA # Check free space on the root filesystem
df -h /
# List block devices and mount points
lsblk -o NAME,SIZE,TYPE,MOSQL,ROTA # Check free space on the root filesystem
df -h /
# List block devices and mount points
lsblk -o NAME,SIZE,TYPE,MOSQL,ROTA # Check free space on the root filesystem
df -h /
# Allocate 50 GB for the swap file on the root filesystem
-weight: 600;">sudo fallocate -l 50G /swapfile
# Allocate 50 GB for the swap file on the root filesystem
-weight: 600;">sudo fallocate -l 50G /swapfile
# Allocate 50 GB for the swap file on the root filesystem
-weight: 600;">sudo fallocate -l 50G /swapfile
# Restrict permissions to root read/write only
-weight: 600;">sudo chmod 600 /swapfile # Format the file as swap space
-weight: 600;">sudo mkswap /swapfile
# Restrict permissions to root read/write only
-weight: 600;">sudo chmod 600 /swapfile # Format the file as swap space
-weight: 600;">sudo mkswap /swapfile
# Restrict permissions to root read/write only
-weight: 600;">sudo chmod 600 /swapfile # Format the file as swap space
-weight: 600;">sudo mkswap /swapfile
# Enable the swap file
-weight: 600;">sudo swapon /swapfile # Verify active swap devices
swapon --show # Confirm memory and swap totals
free -h
# Enable the swap file
-weight: 600;">sudo swapon /swapfile # Verify active swap devices
swapon --show # Confirm memory and swap totals
free -h
# Enable the swap file
-weight: 600;">sudo swapon /swapfile # Verify active swap devices
swapon --show # Confirm memory and swap totals
free -h
# Append the swap file definition to /etc/fstab
echo '/swapfile none swap sw 0 0' | -weight: 600;">sudo tee -a /etc/fstab # Verify the entry exists
grep swap /etc/fstab
# Append the swap file definition to /etc/fstab
echo '/swapfile none swap sw 0 0' | -weight: 600;">sudo tee -a /etc/fstab # Verify the entry exists
grep swap /etc/fstab
# Append the swap file definition to /etc/fstab
echo '/swapfile none swap sw 0 0' | -weight: 600;">sudo tee -a /etc/fstab # Verify the entry exists
grep swap /etc/fstab
# Apply settings immediately
-weight: 600;">sudo sysctl vm.swappiness=10
-weight: 600;">sudo sysctl vm.vfs_cache_pressure=50 # Persist the settings across reboots
echo 'vm.swappiness=10' | -weight: 600;">sudo tee -a /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' | -weight: 600;">sudo tee -a /etc/sysctl.conf # Reload sysctl configuration
-weight: 600;">sudo sysctl -p
# Apply settings immediately
-weight: 600;">sudo sysctl vm.swappiness=10
-weight: 600;">sudo sysctl vm.vfs_cache_pressure=50 # Persist the settings across reboots
echo 'vm.swappiness=10' | -weight: 600;">sudo tee -a /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' | -weight: 600;">sudo tee -a /etc/sysctl.conf # Reload sysctl configuration
-weight: 600;">sudo sysctl -p
# Apply settings immediately
-weight: 600;">sudo sysctl vm.swappiness=10
-weight: 600;">sudo sysctl vm.vfs_cache_pressure=50 # Persist the settings across reboots
echo 'vm.swappiness=10' | -weight: 600;">sudo tee -a /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' | -weight: 600;">sudo tee -a /etc/sysctl.conf # Reload sysctl configuration
-weight: 600;">sudo sysctl -p
# Disable the swap file usage
-weight: 600;">sudo swapoff /swapfile # Remove the entry from /etc/fstab
-weight: 600;">sudo sed -i '/\/swapfile/d' /etc/fstab # Delete the physical file
-weight: 600;">sudo rm /swapfile # Reload sysctl to refresh kernel state
-weight: 600;">sudo sysctl -p
# Disable the swap file usage
-weight: 600;">sudo swapoff /swapfile # Remove the entry from /etc/fstab
-weight: 600;">sudo sed -i '/\/swapfile/d' /etc/fstab # Delete the physical file
-weight: 600;">sudo rm /swapfile # Reload sysctl to refresh kernel state
-weight: 600;">sudo sysctl -p
# Disable the swap file usage
-weight: 600;">sudo swapoff /swapfile # Remove the entry from /etc/fstab
-weight: 600;">sudo sed -i '/\/swapfile/d' /etc/fstab # Delete the physical file
-weight: 600;">sudo rm /swapfile # Reload sysctl to refresh kernel state
-weight: 600;">sudo sysctl -p - Physical RAM (64 GB unified memory)
- zram (Compressed swap in RAM, ~31 GB total)
- NVMe Swap File (50 GB on /swapfile) - Increased Capacity: Successfully established a 50 GB swap area on NVMe, expanding the total virtual memory capacity.
- Stability: Provided a critical safety margin for running 70B parameter models (e.g., Q4_K_M) that may exceed the 64 GB physical RAM limit during peak usage.
- Optimized Hierarchy: Integrated the new disk-backed swap into the existing zram architecture without disrupting the compressed RAM layer.
- Persistence: Achieved a fully automated configuration that survives system reboots via /etc/fstab tuning.