Swap is ... Swap and virtual memory

With the ubiquity of computers, many foreign words penetrated into the Russian language, about which an ordinary person knows nothing. Previously, they were used only by specialists in a particular field. And the massive use of words of such a plan began relatively recently. One of them is swap. This is one of the few words that can mean radically different operations. Moreover, it belongs to two areas of activity at once. Therefore, many people confuse its meaning. It should be noted right away that this word needs to be defined by context. Only then will it be clear to which particular sphere it belongs at the moment. Now consider the basic concepts associated with this word.

swapping translation




What is swap?

This word comes from English swapping. Translation (literal) looks like "exchange." This word has been present in English for a long time. And there it is an ordinary verb. And only in Russian does it have a completely different meaning. There are several interpretations of this word, and all of them relate to various fields of activity:

  • Swap in the world of stocks. By this term, brokers on exchanges denoted a quick exchange of shares. Currently, swap is also present on large exchanges. At Forex, there is also such a concept, but there it means a quick sale of all shares.
  • Swap in the computer world. In the world of PCs and laptops, this term is called the process of freeing part of the RAM and transferring data to a previously created swap file on the hard disk. A very useful option for those who have little RAM.

However, our material is about computers. Therefore, we assume that swapping is the process of working memory with a swap file. Now you need to understand some of the features of swap and understand whether it is so good and whether, in general, the computer needs it.





OS operation with swap file

It should be noted right away that with a catastrophic lack of RAM, swapping and virtual memory help out the computer's operating system. In general, experts recommend using the swap file for those who have only 4 gigabytes of physical RAM on board. Its use is mandatory if there is less memory. But if more, then the swap file is not needed at all. What is the principle of operation of the "RAM" with the swap file? Let's consider it in more detail.

swap and virtual memory




In the event that there is not enough RAM, the OS moves part of the unused information from RAM to a specially created file on the computer’s hard drive. This frees up space in the physical RAM for new tasks. Such a process is necessary if the "RAM" is critically lacking. This is what OS swap is. Now let's talk about how to configure the page file.

swap it




Setting up the swap file in Windows

Swap is a very useful thing. But it will only work if a swap file was previously created on the computer’s hard drive. If it is still not on the computer, then you should create it. Even if there is enough physical RAM. Even the largest amount of RAM can be quickly filled. So the swap file will definitely not hurt. The instructions for creating this file itself are as follows:





  1. On the desktop, right-click on the "My Computer" icon (it is worth noting that in "Windows 10" it is called differently).
  2. In the menu, click "Properties".
  3. Select the inscription "Advanced system parameters" and click on it.
  4. In the "Performance" block, click the "Options" button.
  5. Go to the "Advanced" tab.
  6. In the "Virtual memory" block, click the "Change" button.
  7. Now in the first window, select the section on which you want to place the page file.
  8. Below we indicate the desired size. It should be not less than the established amount of physical RAM. Better yet, if this is the amount of existing RAM multiplied by two.
  9. Click the "Set" button.
  10. Click OK.
  11. Close the window.
  12. Reboot the computer.

Now swap will work on your computer. This is very good, since the PC or laptop will stop freezing and rebooting if it does not have enough physical RAM. However, not everything is so rosy when using the swap file. This method has certain disadvantages. And they will be discussed in the next chapter.

what is swap in os




disadvantages

What are the disadvantages of swap? In fact, there is only one drawback: very slow speed. If the workflow is placed in the swap file, then its performance is drastically reduced. The fact is that the speed of reading data from a hard drive is several tens of times less than that from the flash memory of a physical “RAM”. Therefore, the speed of the process will be no. Various brakes and glitches are possible. But this rarely happens, since processes that do not work at a given moment in time are usually placed in the page file.

Also a common problem with solid state drives. If you place the swap file on the SSD, then swap will quickly kill it. The resource is limited. Therefore, it is recommended to place swap files exclusively on mechanical hard drives. They have a resource of possible operations much more than that of solid-state drives.

what are the disadvantages of swap




Verdict

So, swap is the process of transferring some processes from the flash memory of the RAM to the hard drive of the computer. The process is very useful, which allows you to free up RAM for new tasks. Like any other process, this one has its drawbacks. But they do not deserve attention, since the benefits of swap more than harm. Just do not need to use this option with solid state drives. Otherwise, they will not live long.

Conclusion

Swapping is a very useful option that helps prevent the brakes and freezes of a computer or laptop with a lack of physical RAM. This method is recommended to be used even for those who have quite a decent amount of physical RAM. But before using this option, you need to create a swap file and place it on your hard drive. Only then can the function work normally. The instructions for creating a page file are written above. It is only necessary to do everything exactly as stated in the instructions. Then there will be no problems.




All Articles