How To Add Swap on Ubuntu 16.04? Linux divides its physical RAM (random access memory) into chucks of memory called pages. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory. The combined sizes of the physical memory and the swap space is the amount of virtual memory available.
Swapping is necessary for two important reasons. First, when the system requires more memory than is physically available, the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately. Second, a significant number of the pages used by an application during its startup phase may only be used for initialization and then never used again. The system can swap out those pages and free the memory for other applications or even for the disk cache.
Commands:
sudo swapon -s
free -m
df -h
sudo fallocate -l 1G /swapfile
ls -lh /swapfile
sudo chmod 600 /swapfile
ls -lh /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -s
free -m
sudo nano /etc/fstab
/swapfile none swap sw 0 0
sudo nano /etc/sysctl.conf
vm.swappiness=10
vm.vfs_cache_pressure=50
-----------
Music by dyalla - New Love - / dyallas
-----------
You can always Deploy an SSD cloud server in 55 seconds
with Digitalocean.
Anyone how use this link will receive $10 in hosting credit immediately after unlocking their account by adding a valid payment method.
Sign Up with this link
https://m.do.co/c/7b9082af029f
Watch video How To Add Swap Space on Ubuntu 16.04 online, duration hours minute second in high quality that is uploaded to the channel NixInPix 27 June 2016. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 3,381 times and liked it 4 visitors.