How to increase swap space in linux redhat 8
- how to resize swap partition in linux
- how to extend swap partition in linux
- how to change swap partition in linux
- how to resize swap space in linux
Swap partition size.
How to increase swap memory in linux mint
Swap space is a dedicated storage space in the disk either in the form of partition or a file. Swap space comes into the picture when Linux kernel wants to allocate more memory to processes by moving infrequently used processes or tasks into the swap space.
There are some scenarios where our Linux box is running out of swap space, so in that case we can extend the swap space either via swap partition or via a swap file.
In this post we will learn how to extend swap space using a swap file in Linux.
Steps to extend Swap Space using Swap File in Linux
Let’s first check the size of existing swap space / partition using the command like ‘free -m‘ and ‘swapon -s‘
In my case, swap partition is of 2 GB.
So we will be extending swap space by 1 GB.
Step 1) Create a swap file of size 1 GB
Run following dd command to create a file of size 1GB,
[root@linuxtechi ~]# dd if=/dev/zero of=/swap_file bs=1G count=1 1+0 records in 1+0 records out 1073741824 bytes (1.1 GB) copied, 414.898 s, 2.6 MB/s [root@linuxtechi ~]#Replace the value of ‘bs‘ and ‘count‘ according your requirement.
We ca
- how to increase swap space in linux
- how to increase swap space in linux redhat 8