Setting up virtual memory. Optimal size of the Windows paging file What size of the paging file to choose

The pagefile.sys file in Windows 10, Windows 7 is a page file, in other words, it is virtual physical RAM on the disk. Why do you need a page file? The page file acts as virtual memory on your hard drive when your main RAM is low on resources. For example, when moving from one program to another that is not used frequently, you will see a slight delay before the program expands to its interface. During this delay, Windows actually moves that program's processes from the pagefile.sys page file to RAM (Random Access Memory) because the memory on your hard drive is not fast enough to allow you to run the program. There is a new file in Windows 10 swapfile.sys. This is the second swap file, but it is not the main one and serves for the virtual memory of UWP applications and the system interface, in particular the start menu. The swapfile.sys file itself does not take up much disk space, so you don’t need to worry about it.

Should I delete or disable the page file?

Answer: NO. When you open a program, it uses some of your RAM. As you open more and more programs, the RAM starts to fill up. When the RAM is full, you will not be able to open any more programs and they will simply start to freeze or crash. Ultimately, this can lead to system instability and a Blue Screen of Death. If you even have 16 GB of RAM or more, then you will probably say that the page file is not needed. This is not true, the moment will come when even 16 GB can be filled, it is enough to open only 15 significant tabs in the Chrome browser and play the game at the same time.

There is no need to take risks; the paging file should be small in any case, even minimal, in order to archive system files. Microsoft has done a great job of balancing the paging file feature, which means it automatically works great. And if you have a lot of RAM, then the pagefile.sys file will not weigh much on your system, since it has enough RAM.

pagefile.sys is a lot, can I move it?

Answer: Yes you can. The fact is that not all users have a lot of space on their local HDD or especially SSD where Windows is located. For example, I use an SSD purely for the Windows system, and store the rest of the files on the HDD. If you don't have much space on your SSD, the best solution is to move the page file to the HDD. But keep in mind that the page file will be slower than on an SSD. For this reason, it is easier for you to buy a drive with more space.

If you only have one HDD, then to create the correct paging file it is best to create a separate local disk FAT32 on which there will only be a swap file, and nothing else will be shoved there: neither movies, nor music. I recommend creating a partition of 10-20 GB in size. When I had one HDD, according to tests it was faster, since FAT32 is more optimal for such HDD sizes. This also applies to SSDs, but you won’t see the difference on SSDs since they are already fast.

What sizes are optimal for a paging file?

The optimal sizes of virtual memory in Windows 10, 7, 8, XP are difficult to calculate. It all depends on many factors: which system is Windows 10 or XP, 32-bit or 64-bit, what is the peak of the dump under system load, how many page errors per second and many other parameters that you need to sit, watch and calculate. If you launch any game or program and you get an error that " Not enough memory", then it would be logical to increase the size of the paging file. There is a formula that will help you:

  • The original size is taken from the "Recommended" column. In my case it is 1915 MB. See screenshot below.
  • On a PC there are four 1 GB sticks (1024 MB), resulting in 4096 MB. Next, 4096 MB x 1.5 = 6,144 MB - This is the maximum size of the paging file.

How to set the paging file size in Windows 10/7

Press Win + R and enter sysdm.cpl to open system properties. Next, go to the " Additionally" and press " Options" in the performance column. In the new window, go to the " tab Additionally" and below click on " Change".

Any user is familiar with the concept of physical memory on a computer; this can be a built-in or removable hard drive on which the processed data is recorded. Modern hard drives are reliable and durable, but they have one significant drawback - low read/write speeds. Therefore, in addition to physical memory, all computers are equipped with a kind of intermediary between the physical disk and the processor - RAM or otherwise RAM, which has a much higher speed than any HDD or SSD drive.

What is a paging file and what is it for?

However, RAM also has its drawbacks, the most significant of which today is its relatively small volume. But in addition to the processes of the system itself, the processes of all user applications, often very demanding of hardware resources, are recorded in it. And when the user runs programs, the total amount of memory he requires may exceed the amount of RAM available on board. In this case, there is a sharp drop in performance, up to the point where individual programs freeze or even the system crashes into BSOD.

To reduce the risk of such an unpleasant scenario developing, the developers created a special file in which the system resets data that does not fit into RAM, and then, when part of the RAM is free, returns it back. It is called the page file; in Windows 7/10 it is also often called virtual memory or page file. To explain in detail the principles of its operation, it would be necessary to read an entire lecture, but we will limit ourselves to this brief explanation: the main task of the paging file is to ensure the best performance of the system and programs under conditions of increased load on RAM.

How to enable the paging file and what its size should be

So, what is a paging file and why is it needed, we hope you understand more or less, now it’s time to move on to a more complex and interesting topic, namely setting it up. In truth, the page file in Windows does not need much configuration except in some special cases. The operating system itself creates it and determines its size based on the physical and software parameters of the computer. By default, this file is located in the root of drive C and has the system name pagefile.sys and, like many system objects, the modification of which is undesirable without special need, is hidden. So if you want to see it, uncheck “Hide protected system files” in the folder options.

If the paging file is in the root of the system disk, most likely you have it enabled. To make sure of this completely, open with the command systempropertiesperformance"Performance Options".

Next, switch to the “Advanced” tab and find the “Virtual Memory” block, where the current size of the paging file will be indicated. If suddenly it turns out to be disabled (size 0), we strongly advise you to enable it. Click the “Change” button in the performance settings window, check the “Automatically select paging file size” checkbox in the next window, turn on the “By system selection” radio button and save the settings.

It’s so easy to put a swap file on Windows 7/10, but this applies to the default settings. You can set your own page file size by disabling automatic volume selection and activating the “Specify size” radio button. Despite the more than sufficient experience of IT specialists, there is no clear opinion about the optimal size of the paging file. Traditionally, it is believed that its volume should be at least equal to the amount of RAM, but this is very approximate, if only for the reason that the swap is dynamic and can increase at the request of the operating system.

So, how much to set the paging file in Windows 7/10, if we are talking about setting it up manually? This depends primarily on the amount of RAM; the system capacity does not play a fundamental role in this case. Taking into account the individuality of a PC, we suggest using the following method to calculate the size of virtual memory. After running as many programs, browser tabs, etc. as possible on your PC, open the Task Manager, go to the Performance tab and note down the amount of RAM used.

Multiply the resulting number by 2 and subtract the actual amount of RAM from the result. The final value will be equal to the recommended page file size.

In general, the less RAM on a PC, the larger the swap should be. So if you are still in doubt about how to properly configure the paging file, use the data in this table, proposed by experienced system administrators:

It should be understood, however, that the figures given here are also averages. There are examples when a paging file is needed even if the PC has 16 or more GB of RAM (this is a requirement of some programs). Also, if you have a habit of leaving a lot of programs running in the background, it is recommended to increase the page file size by 20-30 percent of the above values. On the other hand, if your computer has enough memory, you don’t run “heavy” programs, don’t notice a decrease in performance, and there’s no need to increase it. Three gigabytes of the paging file for 4/8 GB of RAM should be enough to work without “brakes”; an excessive increase will not only not speed up the system, but rather, on the contrary, will slow it down, since Windows will have to access more often not RAM, but to the slower swap file.

In what cases is it necessary to increase the file size?

Let’s assume that we have sorted out the question of what size of the paging file to set; now we will briefly consider the cases when it needs to be increased. In short, because there are only two main reasons - a noticeable decrease in performance when running a large number of programs and the appearance of the error “The computer does not have enough memory.”

It also happens that a program or game requires a swap file of a certain size when launched. How to increase the paging file in Windows 7/10 was theoretically discussed above, in practice it looks like this.

Let's assume that the amount of virtual memory is set according to the system's choice and we need to increase it. Using the systempropertiesperformance command, go to the performance parameters, click change virtual memory, uncheck the option for the system to automatically determine the size of the paging file and specify your own size. You don’t have to bother with the initial and maximum sizes, set the same values ​​in both fields, click “Set”, save the settings and restart the computer. This is how easy it is to change the size of the Windows swap file.

Using a swap file on an SSD

The use of FP on SSD drives should be mentioned separately. There is an opinion that a paging file is not needed on solid-state drives, since, firstly, they are already fast enough, and secondly, repeated data writing shortens the life of the disk. Both of these statements are incorrect. No matter how fast SSDs are, they are still significantly inferior in terms of RAM throughput and, if the latter is not enough at a certain moment, the user will immediately experience a decrease in system performance.

In addition, the volume of data written to the FP on the SSD is not so large as to exhaust the resources of the memory cells (this will take many years). Moreover, the performance characteristics of SSDs and the basic models of using the paging file fit together perfectly, so if your computer has two disks and one of them is an SSD, then it is recommended to place the paging file on it, as it is the fastest! In addition, do not forget that disabling the FP will make it impossible to diagnose critical errors in the system (creating an emergency memory dump).

So, is a page file necessary on an SSD? We can say with a greater degree of confidence that yes, even if the system did not enable it during installation. The exception is PCs with a very large amount of RAM (16 GB and above), but even here everything is not always so simple. As for extending the life of SSDs by disabling/moving the FP, there is some truth here, since the practice of using solid-state drives has clearly shown that their service life directly depends on the load placed on them.

However, there is no need to worry about this. If the PC has sufficient RAM, the page file on the SSD will be used minimally, and there are many other and more significant factors that affect the life of the SDD, including defragmentation, hibernation, TRIM, indexing and other functions.

Well, we hope we have figured out the question of why a paging file is needed. Of course, there are still many subtleties in its use. For example, there are such issues as transferring the file from the system HDD to the user HDD, partitioning, automatic cleaning, and using special configuration utilities, but this is a topic for a separate article.

Hello dear readers! Today we are opening a series of articles about optimizing a computer on Windows OS. Let's start with such a thing as . In this article you will find answers to the following questions: Where is the paging file located?; How to properly configure the paging file?; How to set the optimal paging file size for different amounts of RAM? Go!

Swap file (pagefile.sys) is a system file on the hard drive (usually the system drive) of the computer, which serves as a kind of addition (extension) to the RAM. This additional memory is also called the computer's virtual memory.
Virtual memory- a method of managing computer memory for executing programs that require larger amounts of RAM than is actually available on the computer. Such programs obtain the missing RAM from the swap file. In other words, the page file relieves RAM during periods of heavy load.
RAM is many times faster than page file memory. If you simultaneously run several applications on the system that consume a lot of RAM, then the data of unused ones will be unloaded from RAM into slower virtual memory. Active applications will be served directly by random access memory (RAM). Also, if, for example, a minimized application is expanded, then the data from virtual memory will again go into RAM.

How to configure the page file and change its size?

Competent, Correctly setting up the paging file will help significantly speed up your computer. It would be a sin not to take advantage of this. Where can I configure it?

  1. For Windows XP:
    Start > Settings > Control Panel > System > Advanced > Performance > Settings > Advanced > Edit
  2. For Windows 7/8/Vista:
    Start > Settings > Control Panel > System > Advanced system settings > Performance > Settings > Advanced > Virtual memory > Change

To the point Performance You can also get there by entering the command sysdm.cpl in the command line Execute(The command line can be opened by pressing WIN+R).

If you did everything correctly, you should end up in the window Virtual memory. By default, in Windows 7/8/8.1/10, the size of the paging file is determined automatically by the system itself.
As you can see in the picture, the paging file can be configured for each partition (and each disk) separately. To set your paging file size, you need to:

  1. At the very top of the window, uncheck the box Automatically select the size of the paging file.
  2. Select the partition (or physical disk) for which the paging file is being configured.
  3. Select the radio button Specify size, specify the Original size and Maximum size(indicated in megabytes)
  4. Be sure to click on the button Set.

To disable the paging file, select the switch No swap file.

Windows swap file size. Which one is correct?

There are different versions regarding the optimal size of the paging file. I will express my point of view on this matter, which is based on my observations and experiences with the page file on various equipment. It may coincide with the opinions of some IT specialists. I am an adherent of the version that if the computer has 6-8 GB or more of RAM installed, then The page file can be completely disabled. I think that large volumes of the swap file only slow down the computer. Of course, if the amount of RAM is less than 6 GB, then it is better, of course, to set a certain amount of additional virtual memory.
How to correctly set the size of the paging file? The minimum paging file size must be the same as the maximum. For example: 512-512 , 1024-1024 , 2048-2048 are correct padding, but 512-1024 , 1024-2048 are incorrect padding.
The same minimum and maximum size of the paging file reduces the size of this file, and this consequently speeds up the process of reading information from it.
Now, depending on the amount of RAM, let’s see what size of the paging file needs to be set. There are the following approximate indicators:

  • The optimal paging file size for 512 Mb of RAM is 5012 Mb;
  • The optimal paging file size for 1024 Mb of RAM is 4012 Mb;
  • the optimal paging file size for 2048 Mb of RAM is 3548 Mb;
  • the optimal paging file size for 4096 Mb of RAM is 3024 Mb;
  • the optimal paging file size for 8 GB of RAM is 2016 Mb;
  • optimal paging file size for 16 GB of RAM (or more), - without swap file.

Of course, this is a subjective view and these indicators cannot be absolutely accurate or recommended, but in practice they were the ones that had the effect. You can experiment yourself and find the best combination for your computer. There are also some notes here.

For example:

  1. Some applications require a page file. Disabling it may lead to errors in the operation of such applications. If you disable virtual memory on the system disk, it will also become impossible to record a memory dump during BSOD (Blue Screen of Death).
  2. If you, as a rule, minimize several applications, leave them running, and switch to others, then you may also need a large page file, since the data of minimized applications is written to it. Although, here too it all depends on the volume RAM.

Correct paging file location. On which disk should I enable it?

If you have several physical disks on your computer, then you need to install the page file on the fastest disk. It is believed that the paging file is divided into 2 parts:

  1. The first part on the system disk (partition) (just for recording debug recording information for blue screens of death)
  2. The second part on the fastest disk

In this case, during operation, the system accesses the least loaded partition without touching the first one.
It is also recommended to create a separate partition for the paging file, with a memory amount equal to or close to the size of the paging file (for example, 2024MB). This trick allows you to get rid of fragmentation of this file.

Results:

I hope the tips given in this article will help you correctly configure the paging file on your computer and optimize its operation. If you have questions, write in the comments, I will try to give comprehensive answers.

The pagefile.sys file in Windows 10, Windows 7 is a page file, in other words, it is virtual physical RAM on the disk. Why do you need a page file? The page file acts as virtual memory on your hard drive when your main RAM is low on resources. For example, when moving from one program to another that is not used frequently, you will see a slight delay before the program expands to its interface. During this delay, Windows actually moves that program's processes from the pagefile.sys page file to RAM (Random Access Memory) because the memory on your hard drive is not fast enough to allow you to run the program. There is a new file in Windows 10 swapfile.sys. This is the second swap file, but it is not the main one and serves for the virtual memory of UWP applications and the system interface, in particular the start menu. The swapfile.sys file itself does not take up much disk space, so you don’t need to worry about it.

Should I delete or disable the page file?

Answer: NO. When you open a program, it uses some of your RAM. As you open more and more programs, the RAM starts to fill up. When the RAM is full, you will not be able to open any more programs and they will simply start to freeze or crash. Ultimately, this can lead to system instability and a Blue Screen of Death. If you even have 16 GB of RAM or more, then you will probably say that the page file is not needed. This is not true, the moment will come when even 16 GB can be filled, it is enough to open only 15 significant tabs in the Chrome browser and play the game at the same time.

There is no need to take risks; the paging file should be small in any case, even minimal, in order to archive system files. Microsoft has done a great job of balancing the paging file feature, which means it automatically works great. And if you have a lot of RAM, then the pagefile.sys file will not weigh much on your system, since it has enough RAM.

pagefile.sys is a lot, can I move it?

Answer: Yes you can. The fact is that not all users have a lot of space on their local HDD or especially SSD where Windows is located. For example, I use an SSD purely for the Windows system, and store the rest of the files on the HDD. If you don't have much space on your SSD, the best solution is to move the page file to the HDD. But keep in mind that the page file will be slower than on an SSD. For this reason, it is easier for you to buy a drive with more space.

If you only have one HDD, then to create the correct paging file it is best to create a separate local disk FAT32 on which there will only be a swap file, and nothing else will be shoved there: neither movies, nor music. I recommend creating a partition of 10-20 GB in size. When I had one HDD, according to tests it was faster, since FAT32 is more optimal for such HDD sizes. This also applies to SSDs, but you won’t see the difference on SSDs since they are already fast.

What sizes are optimal for a paging file?

The optimal sizes of virtual memory in Windows 10, 7, 8, XP are difficult to calculate. It all depends on many factors: which system is Windows 10 or XP, 32-bit or 64-bit, what is the peak of the dump under system load, how many page errors per second and many other parameters that you need to sit, watch and calculate. If you launch any game or program and you get an error that " Not enough memory", then it would be logical to increase the size of the paging file. There is a formula that will help you:

  • The original size is taken from the "Recommended" column. In my case it is 1915 MB. See screenshot below.
  • On a PC there are four 1 GB sticks (1024 MB), resulting in 4096 MB. Next, 4096 MB x 1.5 = 6,144 MB - This is the maximum size of the paging file.

How to set the paging file size in Windows 10/7

Press Win + R and enter sysdm.cpl to open system properties. Next, go to the " Additionally" and press " Options" in the performance column. In the new window, go to the " tab Additionally" and below click on " Change".

A page file, or swag file, is a software addition to RAM that helps the system run faster when the main RAM is occupied by more important processes. RAM, as we understand, can be installed differently on different devices, which is why the question arises, what should be the optimal size of the paging file, in our case, for Windows 10.

How is the optimal size calculated?

Correctly setting the size of the swag file should be based on the formula “the larger the amount of RAM, the correspondingly smaller the swap file should be.” This rule will allow .

Some experts insist that for a RAM volume of 8 GB, the optimal FP size should be zero, in other words, completely removed. But this is not entirely correct advice; do not forget that some work applications will require you to have a swap file.

Below we will take a look at a small table where approximate values ​​will be indicated for calculating what size to install and at what volume. Why exemplary? When answering the question “how to correctly set the paging file on Windows 10,” additional factors must be taken into account, such as the purpose for which the device is used. The maximum FP size for a gaming computer and a simple workhorse will be slightly different - RAM is used differently in these cases.

Have you thought about it? Detailed instructions are available on our website.

This method will help in optimizing the system for gaming, for example, calculating the size of the paging file for Windows 10 with 4 GB of RAM for games.

If you are not a supporter of all these calculations, you need a ready-made solution on how to choose the size of the paging file, then consider the average data (if you are an average PC user):

Let’s make a reservation once again - the data is approximate and depends on the circumstances. You can read about how here.

If, after the previous instructions, we have already decided what the FP should be on our computer (how many sizes to set), then it’s time to move on to how to set them correctly.

How to configure the swap fileonWindows 10

Here's how to correctly set the desired FP size based on the original one:

There is a way, if you are interested, go to the corresponding article.

Publications on the topic