How To Create Swap RAM in Linux | Increase Swap Space In Linux


 Hii Guys welcome back my new post in this post i will show you How to create swap space in linux we also let you know How to increase ram in linux system and also

in this post i will tell you what is a swap partitions and how does swap management work work in linux, and in this post, we will look closely at how create swap space, how it will be start and make

What is Swap in linux

swap memory is used in linux system, when your physical RAM is full, and swap memory uses its spaces, when the system needs more memory, using swap memory makes your system much faster than before.

Benefits Of Swap Memory in Linux

you also get to see many advantages of swap memory, if you have a low ram PC or Laptop, then you can increase the ram with the help of swap partition so there is no problem in the performance of your system. and whatever you are doing your work like programming or developing something then you can easily develop.

Swap already comes by default in many linux distributions such as Kali Linux, Ubuntu, in which you already get by adding partitions to thea swap memory.

Where swap is used more

Swap memory and partitions is most commonly used in Cloud systems and servers. and many users buy a low ram machine and increasing its ram with the help of a swap space. 

by the way, swap partition and space becomes a good options for the users, with the help of which they can increase the ram of their machine,

otherwise, they have to use a high ram machine and you know if you use a high ram machine, then the bill is the amount of it you may not be able of afford

Which OS Support swap space

if seen, you get the swap features to available only in Linux system, it will not be available in windows and will not be available in Mac also

How Increase Swap in Windows and Mac

in windows and mac you are already given swap memory by the company by adding, by the way, you can also increase swap memory in windows, but it is quite difficult.

How to create swap space on android

yes you can add swap space on android mobile, but the firts thing you need rooted android mobile for adding swap space on android, without rooted mobile does not support swap partitions.

if you have a rooted mobile, you can add swap memory with the help of Termux application, you can add swap memory with termux, to add swap on termux, you have to follow this blog, in this blog i am doing on linux system, you can do the same process your termux,

Step-1

To create swap partitions you have to open the terminal of your linux system. and you have to create separate folder. here we are going to create our swap memory.

we are creating a new folder so that our swap file can be saved in a folder and we can access it from here whenever we want,

mkdir swap





Step-2
after entering the folder, you have to select the size of your swap partition. you can create as many size swap partitions as you want, but i will recommend you do not exceed 5GB, i am also creating a swap partition of 5GB.
i have selected a swap partition size of 5GB, 1GB is my system memory(ram), 5GB i made the swap partition, now the total memory size my machine is 6GB.

fallocate -l 5G swap



Step-3

after creating swap file of 5GB, you have to give permission to this file so that it can run properly in your system.

chmod 600 swap


Step-4

ok after giving permission to the swap file, you have to make it so that it will add to your system's memory (RAM), now this 5GB swap file will always be in your system until you delete this file.

mkswap swap


Step-5

after the swap memory is added, you have to turn it on in your system so that it will be attached to your memory. now if there is a need for ram in your system, then that system will start using your swap memory so that will be no problam on the perfomance of your system.

swapon swap





Final Step

now for the guys demo i open three different browser Google Chrome (because Chrome browser uses more ram) and open the unlimited tabs of the terminal and you will see that there is no problam on the perfomance of our system.



Adding swap memory make system slow

does adding swap memory and partition slow down your system performance, i would like to tell you that it does not, by adding swap memory, your system never slow down, no problem in its performance, with the help of swap memory you get even more improvement in the performance of your system,

large organizations and large cloud servers using swap space and partitions to increase its performance even more.

so with help this blog, you can increase the ram your system and increase the your system performance.

Conclusion

the conclusion of this post is that how can increase your linux system performance and do not any problem on your system after creating swap memory, and also how to create swap partitions in linux, and swap space management in linux, so guys i hope you like this post and i will see you in the next useful post, Thanks.


Post a Comment

0 Comments