What is RAM memory? RAM and SWAP
Find out what RAM is and how it is related to RAM SWAP
The RAM memory (for its acronym, Random Access Memory; Random Access Memory) is a workspace in servers, computers, programs and software in general. Its main purpose is to exchange information between the operating system, software, processor and other devices . In this memory, the information executed by computer units such as the processor is loaded.
The need for its existence responds to the fact that the CPU should not collect and write information directly to the hard disk , in order to speed up the delivery and writing of content on your server. In this way, from being an accessory component to operation, it became vitally important on the performance and performance of a device.
The task of RAM memory is to store information so that the actions you carry out on your computer or server are as fast as possible, so as not to resort to the hard disk directly.
Why is it random (random access memory)? Because it can be written or read with equal waiting times for any position, in order to access said information as quickly as possible.
Ram SWAP is responsible for complementing the operation of traditional RAM, the task of SWAP is to save temporary information, reducing the use of RAM . If you properly combine the use of your RAM and SWAP memory, you can obtain optimal results over what the server can normally offer you.
Swap would then correspond to an available swap space on the hard disk that stores the processes you run in images, reducing the use of RAM and optimizing its operation.
When a server or VPS, the operating system looks for a low-active process and moves it to the swap area, freeing up space in main memory to load new processes. When it is needed again, it falls back on these temporary images and loads it back into main memory.
RAM SWAP and RAM
Making a comparison does not make sense since they are complementary entities. SWAP is necessary to hibernate or suspend a computer, for example.
SWAP is much slower than RAM, since its function is different (to store and retrieve temporary data on the hard disk).
SWAPINESS: How do I know when I am using SWAP?
Linux distributions by default use a swappiness of 60%. This means that SWAP memory does not come into play until 60% of normal RAM is in use. So 60% would represent the limit from when your server, computer or VPS would use SWAP.
It is possible to modify this value by editing the following file:
> /proc /sys /vm /swappiness
Over the years, like all technology, software development has required RAM memory to improve its speed and latency times.