On which drive to put the page file? What is a swap file?

Many users of Windows systems know that in all OSs of this family there is a special tool for optimizing the speed and functioning of software components, called virtual memory, the use of which is activated when there is not enough RAM. The system component pagefile.sys or the page file is responsible for its work. It is believed that ordinary users do not need to change the settings for using virtual memory, since the system itself regulates its use in automatic mode. However, sometimes it’s very advisable to set your own options, which will optimize the work of your computer or laptop even more. But on which drive to put the page file in order to achieve the most effective result? The question is not an idle one, so it’s worthwhile to dwell on the basic principles of using virtual memory and choosing the preferred disk or partition in which the pagefile.sys component will be stored.

The principles of virtual memory

To begin, let's briefly dwell on the main aspects related to the functioning of virtual memory. It is not some invisible (virtual) component, but it is a very real thing, which, if you want, you can even “touch”.

Virtual memory is nothing but a specially reserved space on the computer’s hard drive, which begins to be actively used at the moment when the RAM is loaded “to the eyeballs”, and can no longer process all new and new components of running applications and services. Applets of running programs and processes, most often presented in the form of dynamic libraries and drivers for the equipment currently being used, are not unloaded from RAM. It turns out that it is no longer possible to place new similar components when starting other applications in RAM. When using virtual memory, they are "reset" to that very place on the hard drive. The swap file in this case acts only as a kind of regulator, just responsible for backing up the disk space used for virtual memory.





Paging file in Explorer




In the Windows settings of any generation, the memory paging file is stored by default on all connected hard drives and system partitions, which is not always the best option. The most basic problem of many ignorant users is their belief that the greater the amount of allocated disk space for virtual memory, the better. But virtual memory works in a slightly different way, and the speed of loading and processing program components when they are “dumped” to the hard drive is several times lower than with direct access to RAM. So it turns out that when setting an excessively large size of FP and VP (swap file and virtual memory), the system not only does not accelerate, but also starts to slow down incredibly.

How does a swap file affect system performance?

Numerous studies show that storing the desired system component (FP) in the system partition quite often causes a decrease in performance even when using the default settings. This is especially true for cases when the system drive "C" has the NTFS file structure, which is used when installing the OS with the x64 architecture. The use of virtual memory for logical partitions, on which users usually store only extremely important files (so that they are not deleted during a possible reinstallation of Windows), seems completely impractical. But then a perfectly legitimate question arises: on which drive do I need to put the page file, if it is not recommended to use either the system or logical partitions for this? If you do not have the necessary knowledge, it is better not to touch the settings or disable the use of virtual memory for the logical partition. But here everything is very highly dependent on the installed amount of RAM. Let us dwell on the optimal solution a bit later, but for now let's look at the basic settings.





How to call the settings?

To access the options for changing the VI and FP through the computer properties, go to the advanced settings section.

Recall virtual memory settings




Now in the window that opens, in the performance block, click the parameter button, then go to the "Advanced" tab and in the virtual memory block, click the FI change button. It is easy to see that automatic size selection was initially activated (a checkmark is set at the very top of the item responsible for this).

Standard Windows Options

However, even with this state of affairs, many people notice that for some reason in the very bottom block there are recommended values ​​set by the system itself.

System recommended paging file sizes




What is the matter here? This is done so that the user can focus on their preferred settings if they suddenly decide to change them. It is easy to see that the current and recommended sizes can vary quite significantly. When using an oversized size, the system will just slow down.

How to change the settings of the memory paging file?

Let's try to change the options a little. Regarding which disk to put the page file, for starters just select the system partition in the list of disks at the top, uncheck both automatic selection points, and then write down the very recommended options located in the lower block.

Swap file size resizing




In order for the settings to be activated, the computer must be restarted without fail, after which you can see how stable Windows is and how fast it has improved.

Recommended Virtual Memory Options

In general, even such a solution is optimal to call optimal. It is recommended to use it only for those users who are not particularly versed in these settings and do not want to conduct experiments on their own computer system. Nevertheless, most specialists give the average values ​​of options that directly depend on the amount of RAM, presented in the image below.

Paging file size versus RAM size




As you can see, with 6-8 GB of RAM, virtual memory can be turned off altogether.

If we talk about the preferred paging file size for games, there are several important points to consider. Firstly, it seems highly doubtful that modern computer games with their most complex textures will be installed on low-power PCs with small amounts of RAM, and secondly, it must be taken into account that most of them necessarily require a powerful graphics accelerator with its own the amount of allocated (discrete) memory.

Thus, in the processing of graphics and other components of the game application, both RAM and the memory of the video card will participate. In other words, with a sufficient amount of RAM and a discrete graphics adapter, you can refuse to use the VP. But this does not apply to those cases when you and the game will simultaneously launch several more demanding applications. Alternatively, in order to prevent emergency situations related to RAM overload, in the tenth version of Windows, you can immediately set the game mode for the program (Win + G). When the game starts, all other processes will be blocked.

Which drive is better to put the swap file on?

Finally, we consider a few non-standard solutions, which, according to many experts who tested stationary computer terminals and laptops, are the most profitable in achieving optimal performance.

Suppose you have not one hard drive installed on your computer, but two or more. In this case, they form the so-called RAID array. On which drive to put the page file? Naturally, only at the fastest. For example, if one disk is an obsolete HDD of the standard HDD, and the second is a newer solid-state modification of SSD, activating the use of virtual memory with FP preservation, if it is really required, is better on SSDs (SSDs are faster if compared with ordinary HDD )

An equally interesting and even somewhat unusual solution to the problem of which disk to put the page file on is to create an independent partition with a size of the order of 15-20 GB, but always with the FAT32 file structure. True, there is one important nuance here. It is categorically not recommended to place any other data like movies, music, documents, etc. on a disk with a swap file in Windows 7 or similar OSs. Moreover, you should not install any components of user applications in this section. There he must be the only inhabitant!

Partitioning a Disk




To perform such actions, you can “pinch off” a place in the same system partition, using not even system tools, but more advanced programs like AOMEI Partition Assistant, in which you can resize by moving a single slider followed by formatting and confirmation of execution all scheduled operations.

How appropriate is the use of virtual memory?

By and large, the issues of using virtual memory are very controversial, and there is still no consensus on this issue.

Disable swap file




However, with absolute certainty it can be argued that when working only with office applications, even on relatively weak PCs with 2-core mid-range processors and only two gigabytes of RAM, disabling the FP will have an extremely positive effect on the system. But if you are using resource-intensive applications on such configurations or running several office applets at the same time, it is better to set the parameters recommended by the system or set the options that were presented in the list above.

conclusions

Summing up, the conclusion can be made completely ambiguous. Of course, if you have only one hard drive, and the swap file is vital, it is better to leave it in the system partition, but specify the size based on the above recommendations. If there are high-speed drives, the FP is best left on them. But the use of independent partitions looks as efficient as possible.




All Articles