To create swap space, again within DDC, telnet type:
Initialise file that will be used as swap
dd if=/dev/zero of=/media/usb/swapfile bs=1024 count=8192
Prepare the swapfile
mkswap /media/usb/swapfile
Activate the swapfile
swapon /media/usb/swapfile
If you ever want to deactivate it then
swapoff /media/usb/swapfile
In the above replace
/media/usb with the path to where you want to create the swap, so if on HDD then
/media/hdd but I wouldn't recommend using the HDD as in theory it will be slower and with the swap active the HDD will never spin down. The
bs is the block size, in this case I've used 1k blocks and the count is the number of these blocks to write, so the combination of the block size and count will dicate the size of the created file, in this case 8Mb. The name
swapfile can be anything you want, just seemed to make sense to call it what it is
So having done the above when I run
free it now shows that I have an 8Mb of swap which means that the box now has the 8Mb space which it can use to swap our memory to the USB if a program makes a demand for for memory beyond 2.7Mb: