Setting up a swap file
I understand why the unit ships without a swap file enabled - it's only got 2 GB of space on the device, but enabling a swap file greatly helps performance, and gives me the ability to run multiple programs at once.
It's pretty simple to set up a swap file. I set one up on my SD card, giving it a size of 512MB.
First, the actual file needs to be created with the following command:
dd if=/dev/zero of=/swapfile bs=1024 count=524288
swapfile being changed to the location and name of what you want to call it.
Next, you'll want to make the file an actual swap file, issuing the following command:
mkswap /swapfile
You'll then need to properly set the security of the file:
chown root:root /swapfile
chmod 0600 /swapfile
To turn on the swap file, issue the following command:
swapon /swapfile
You can have this swap file activated each time the system boots by editing /etc/fstab and adding the following line:
/swapfile swap swap defaults 0 0
I understand why the unit ships without a swap file enabled - it's only got 2 GB of space on the device, but enabling a swap file greatly helps performance, and gives me the ability to run multiple programs at once.
It's pretty simple to set up a swap file. I set one up on my SD card, giving it a size of 512MB.
First, the actual file needs to be created with the following command:
dd if=/dev/zero of=/swapfile bs=1024 count=524288
swapfile being changed to the location and name of what you want to call it.
Next, you'll want to make the file an actual swap file, issuing the following command:
mkswap /swapfile
You'll then need to properly set the security of the file:
chown root:root /swapfile
chmod 0600 /swapfile
To turn on the swap file, issue the following command:
swapon /swapfile
You can have this swap file activated each time the system boots by editing /etc/fstab and adding the following line:
/swapfile swap swap defaults 0 0