RaspberryPi – how to increase SWAP size

raspberrypilogo

By default the raspberry pi comes with just 100mb of SWAP size, which in some cases is a little to small. In order to increase it, or change it, just follow the next steps.

1. Stop de SWAP:

sudo dphys-swapfile swapoff

2. Change the size with the desired one by editing the file /etc/dphys-swapfile

In mai case: CONF_SWAPSIZE=1024

3. Reinitialize the SWAP:

dphys-swapfile setup

4. Start the SWAP:

sudo dphys-swapfile swapon

Have fun!

Comments

comments

Author: ionut_d

Leave a Reply

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