How to increase the swap file and is it worth it?

A lot has been written and said about how to increase the page file. This process does not cause any particular difficulties for users. The question is different: to what extent can its size be changed, what value for the amount of virtual memory can be considered the most optimal, and in general, is it worth doing such things? Read more about this and much more.

What is a swap file?

So, before figuring out how to increase the swap file, you should dwell a little on theoretical information, without the knowledge of which the steps below may not give the desired result. The swap file itself, which is present in the system as the pagefile.sys component, is an information object responsible for the operation of virtual memory and the amount of space on the hard disk reserved for it. Yes Yes! It is on the hard drive, and not in some abstract virtual area. And the file size just corresponds to the disk space allocated for the needs of virtual memory. But what is it for? Here you can not do without a brief explanation of how virtual memory works in general.

The principle of virtual memory

This type of memory is directly related to operational memory. When the operating system, due to the large number of its own processes and user-intensive applications launched by the user, there is not enough RAM for processing the components loaded into it (most often dynamic DLLs), and the virtual memory is accessed.

Virtual memory usage

The necessary program components are no longer unloaded into RAM, but into that reserved space on the hard drive. But only each user should clearly understand that the speed of access to the hard drive is an order of magnitude lower than a similar request to RAM cells. That is, software components will be processed more slowly. Unfortunately, many users believe that increasing the size of virtual memory supposedly allows you to expand the amount of RAM and increase the speed of the system. This is not so, and the effect of an increase in the size of this component can be exactly the opposite of what was expected.

Standard swap file size

That is why the developers of Windows systems have somewhat limited user intervention in such settings and introduced the system itself to set the optimal amount, which directly depends on the amount of RAM.

Standard swap file size

You can check the settings through the properties of the computer by going to the performance parameters and the virtual memory section, as shown in the image above. In this example, you can see that the RAM is 8 GB, the current page file size is 1280 MB, and the recommended size is 1905 MB. Immediately pay attention to the section block. The size of virtual memory is set for each of them.

How to increase the swap file in Windows 10 or other similar systems?

But back to the main question. How to increase the swap file? To do this, you first need to uncheck the line for automatic detection and activate the item for setting your own values ​​(minimum and maximum size for each disk or logical partition).

Swap file size resizing

But how to set the page file? In this regard, the opinions of users and experts were divided. There are unwritten recommendations regarding the set volumes, and the parameters used look something like the one shown in the table below.

RAM capacity (Mb)

Pagefile.sys Size (MB)

512

2248

1024

2048

2048

1512

4096

1024

8192

Disconnected

How to increase the swap file, a little figured out, with the recommended values, too, everything seems to be clear so far. But let's look at the settable parameters from a practical point of view. Despite these values, most experts give slightly different recommendations and advise setting the size of the paging file exactly half the size of RAM.

Is it possible to disable virtual memory?

No less often you can find recommendations for the complete disabling of virtual memory. Does that make sense? Of course!

Disable swap file

If you set the swap file too large, it will only cause the software components to be initially downloaded to the hard drive, bypassing RAM, which will only slow down the system. If the computer does not use heavy programs that require a huge amount of system resources (multimedia processing applications, engineering programs like AutoCAD), and the user works exclusively with office applications, this component can be disabled at all (for virtual partitions, if the installation of programs is by default produced in the system partition, it is not needed initially). As practice shows, the speed of computers with 2-core processors of the budget level and 2 GB of RAM is not only not suffering, but even increasing.

However, to disable the use of virtual memory or not, each user decides for himself. Given the use of resource-intensive applications with small amounts of RAM, this is not recommended. In any other case, there will be nothing wrong with the shutdown.

Source: https://habr.com/ru/post/C28914/


All Articles