Swap Space

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Actually, is that swap space? If the analogy is like this, for example we work in an office, now our work desk has a lot of tasks that must be done, so if there is a new file that is unloaded, the file space is created, so the files on our work table are not too full .

That’s the analogy, swap is like a backup memory.

Then, there are two ways to create swap memory, namely by using partitions, and using ordinary folders or files

First step
First, I will explain how to make swap memory using partitions.

How:

The first
Specify the partition that you will make swap memory.

Placeholder

I will become my sdb3 partition as swap memory.

How to?

mkswap / dev / sdb3
Then, to turn it on

swapon / dev / sdb3

Do you see the difference?

then, you can check whether it works on

free -mt
Placeholder

Then, if you want to reflect (make it permanent) when restarting it immediately appears, so we don’t turn on every time we turn on our PC.

How:

nano / etc / fstab
Add it

/ dev / sdb3 swap swap defaults 0 0
Placeholder

Adjust to the partitions that you have

Second way
Secondly, we use files for swap memory.

How:

The first
dd if = / dev / zero of = / root / myswapfile bs = 1M count = 1024
name after / root / myswapfile (this is free)

The second
The second we change the permissions to

chmod 600 / root / myswapfile
The third
Just like the first way

mkswap / root / myswapfile

then

swapon / root / myswapfile
After that, then we want to patent it like the first way, the method is the same

nano / etc / fstab

then add

/ root / myswapfile swap swap defaults 0 0
Thank you
Maybe that’s what I can write this time, as usual, criticism & suggestions are needed in my writing to be better in the future. So, you can contact me via Twitter, Instagram, which is listed at the bottom of my website, or on the criticisms & suggestions menu which is right on the top of my web.

Thanks.

One thought on “Swap Space”

Leave a Reply

Your email address will not be published. Required fields are marked *