BLOG

Setup swapfile on FreeBSD

Your process consume more memory than there is physical RAM (e.g compelling on a raspberry pi)? In that case you need swap space.

1
2
3
4
5
6
7
dd if=/dev/zero of=/swapfile bs=1m count=512
chmod 0600 /swapfile
echo 'md99            none            swap sw,file=/swapfile  0 0' >> /etc/fstab
reboot
swapon -aLq
swapinfo
swapctl -lh

Based on: