This method of adding RAM capacity will not yield much of a performance boost. But is may be useful for troubleshooting or for allowing you to complete some difficult computing processes. It should go without saying that the faster your USB the better this works. Also the memory stick must be empty, you will need to move or delete any files that have been saved on this memory stick.
In linux you can dedicate the usb drive to SWAP OR simply create a SWAP file. Creating a SWAP file (rather than using the whole drive) allows you to also keep normal files on the drive.
find out where the stick is mounted. Look in nautilus or issue the mount command in the terminal
create an empty file:
dd if=/dev/zero of=/media/YOURSTICK/swap bs=4096 count=131072This creates a 512 MB file (512 * 1024^2 / 4096 = 131072)
create the swap and enable it
sudo mkswap /media/YOURSTICK/swap && swapon -p 1000 /media/YOURSTICK/swap