█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
[Synopsis]
This video shows you how to change the SWAP memory settings in the Raspbian operating system.
SWAP memory is like virtual memory. When your computer uses up all of is RAM memory, it resorts to using SWAP/Virtual memory by using your storage space. You have storage memory which is your hard drive or microSD memory, and this type of memory is slower than RAM memory. When you run out of RAM, your computer keeps reading the hard drive using this virtual memory. If you didn't have this SWAP/Virtual memory then your computer would just crash.
You can either set the SWAP memory, or you can set it automatically. In this video, I do both, I set it automatically, and I also set the SWAP memory as well. On a X86 or X64 based operating system, I usually set the SWAP memory to be half of RAM memory. Back in the late 1980s and early 1990s, we used to call this RAMDISK. It basically used some hard drive space to emulate RAM, so it is basically the same thing I did on this video on the Raspbian Operating System.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
[Commands]
df -h - [Check Storage Space]
du -h /var/swap -[Check SWAP memory/virtual memory]
sudo nano /etc/dphys-swapfile -[Edit can configure the swap memory]
sudo /etc/init.d/dphys-swapfile restart -[Restart the SWAP memory service]
sudo /etc/init.d/dphys-swapfile stop -[Stop the swapfile service]
sudo /etc/init.d/dphys-swapfile start -[Start the swapfile service]
free -m or free -h -[Check to see how much swap space you have]
CONF_SWAPSIZE=2048 -[Change to 2 gb or 2048 mb]
CONF_SWAPFACTOR=2 -[SWAP FACTOR Automatic Settings]
-[Uncomment or negate code]
█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█