Restrict limit of use of SWAP memory.


 Hi guys, it's my first post and we're going to talk about SWAP.


1.What is SWAP MEMORY?

Memoria Swap is a virtual memory that helps the system unburden and run applications without locking.

It basically works as an extension of RAM, which is stored on the disk.

2. Is it interesting that the computer always uses virtual memory (SWAP)?

NO!

The files is written to a storage device, and it is much slower than memory.

 3.What to do?

On GNU/Linux systems you can create swap partitions of the desired size and can manipulate your access if you have too much RAM memory and don't often need virtual allocation.

 Go to the file /etc/sysctl.conf

$ sudo nano /etc/sysctl.conf

In the last line, type:

#
# Reduces swap usage
vm.swappiness=10
# Improves cache management
vm.vfs_cache_pressure=50

Save with a Ctrl + O and exit with a Ctrl + X; restart your PC and ready. 

SWAP limit is set.


Explaining:

vm.swappiness=10
This value comes as standard 60, that is, when your memory reaches 60% of use it will access swap, and can bring slow tasks.

vm.vfs_cache_pressure=50

As the explanation says, it will improve cache management in memory.

Questions? Contact me in my social networks.

GitHub: @yanbrasiliano
Linkedln: @yan-brasiliano
See you next time 💣💢💢

Comments

Post a Comment

Popular posts from this blog

How to Install ZenMap in Kali Linux 2020.3