Increase Swap Space Linux
If you have additional partitions and one of those is a better candidate than the partition feel free to use it instead.
Increase swap space linux. Filename type size used priority. Now let s see how to increase the swap file. Swap on linux can be created in three ways.
We can turn on the swapfile to use as swap space by using the below command. You may have heard before that everything s a file in unix and linux. Add the new pv to existing volume group to extend the available space.
This tutorial assumes that you are using swap file on your system not a swap partition. Dd if dev zero of var swapfile bs 1024k count 1000. Root client swapon s.
For example you may upgrade the amount of ram in your system from 128 mb to 256 mb but there is only 256 mb of swap space. The priority of this swap space has been elevated to 10. The general rule of thumb for swap size is that your total available swap space should be around double your ram size.
Ls lh swapfile rw 1 root root 2 0g may 16 12 52 swapfile. Enable the swap file by running below command. Sudo swapon dev sda4.
First thing first make sure that you have a swap file in your system. Use dd command to fill the swap file with 1 gb size as an example as follows. Sometimes it is necessary to add more swap space after installation.