Skip to main content

Swap

Swap

Increase swap

  1. Temporary stop swap.

    sudo dphys-swapfile swapoff
  2. Modify the swap configuration file.

    sudo nano /etc/dphys-swapfile
  3. Find and edit the following variable.

    CONF_SWAPSIZE=100

    Set new size, example:

    CONF_SWAPSIZE=1024
  4. Re-initialize swap.

    sudo dphys-swapfile setup
  5. Turn the swap back on.

    sudo dphys-swapfile swapon
  6. Restart your Raspberry Pi

    sudo reboot

Source: Increasing Swap on a Raspberry Pi