pdf-icon

StackFlow AI Platform

Module LLM Applications

CV Vision Application

Vision Language Model (VLM)

Large Language Model (LLM)

Voice Assistant

Virtual Memory Adjustment

  1. Create a swap file
fallocate -l 4G /swapfile
  1. Set permissions and initialize the swap header
chmod 600 /swapfile
mkswap /swapfile
  1. Enable swap and verify status
swapon /swapfile
swapon --show
free -h
  1. Create a systemd service to enable automatic mounting
tee /etc/systemd/system/enable-swapfile.service >/dev/null <<'EOF'
[Unit]
Description=Enable swapfile via swapon
After=local-fs.target
Requires=local-fs.target

[Service]
Type=oneshot
ExecStart=/sbin/swapon /swapfile
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
EOF
  1. Enable the service at boot
systemctl daemon-reload
systemctl enable enable-swapfile.service
On This Page