What paging file size to choose. Swap file

What paging file size to choose.  Swap file

A page file, or swap file, is a so-called virtual memory needed to increase the computer's physical RAM.

When running resource-intensive applications, Windows 7 actively uses physical memory, and when it becomes insufficient, it turns to a swap file, which stores data that does not fit in physical memory. The paging file has a strictly defined name pagefile.sys and cannot be changed.

When installing and further installing Windows 7, the system itself selects the required size of the paging file, placing it on the disk with the operating system. However, the parameters set by the system do not always provide the highest performance. In addition, to improve performance, it is necessary to place pagefile.sys on a partition other than the system partition, which will increase performance.

How to determine the size of the paging file

To ensure good performance, you should set the minimum pagefile.sys size to equal the amount of physical RAM, and the maximum to twice that size. For example, if you have 4 GB of memory installed on your computer, then the optimal minimum size of the swap file will be 4 GB, and the maximum will be 8 GB.

Some users set the same size of the initial and maximum swap file, which avoids its fragmentation and, therefore, reduces the load on the system to some extent. However, you can avoid the performance degradation associated with the dynamic size of pagefile.sys by enabling the pagefile.sys cleanup feature after system shutdown.

To enable paging file cleanup when Windows shuts down, open the Local Security Policies window. To do this, go to Start - Run - secpol.msc.

In the next window, you need to find the Shutdown: Clear virtual memory swap file option. Double-click on it, set the Enabled option and click the Apply button.

Where to locate the swap file in Windows 7

Windows 7 allows you to place the paging file on multiple drives at once, but this will not improve performance. The optimal option from a performance point of view is a single swap file located on any partition other than the system one.

To change the default location of pagefile.sys, you must first completely delete it and then create it in a location convenient for you. How to do this is described below.

Start - right-click on the My Computer - Properties shortcut. A window will appear, in the left section of which you should select Advanced system settings.

A new small window will appear where we need the Advanced tab.

Click on the Settings button in the Performance section. Go to the Advanced tab again.

In this tab, you need to click the Change button in the Virtual memory compartment. A dialog box will appear where you can configure the size of swap files on any partition.

If you have not changed the settings after installing Windows 7, pagefile.sys will be located on the system drive ((C:/). Select it and, having activated the No paging file option, click on the Set button. In some cases, a warning may appear. Just click the button Yes.

Return to the Visual Memory dialog box and highlight the drive where you want to place the swap file. Specify the initial and maximum size of pagefile.sys: the initial size should be equal to physical memory, the maximum should be twice as large.

If you want to make the size of pagefile.sys static, the settings in the dialog box will look like this.

If you reduce the size of the paging file, the changes will take effect immediately. Increasing pagefile.sys will require a computer restart. In any case, a window will appear in front of you requiring you to reboot the system.

Proper optimization of a computer allows it to quickly cope with assigned tasks, even with not the most powerful hardware. One of the most important optimization points with a small amount of RAM is setting up the paging file. Most users leave it up to Windows to decide what page file size to use to keep their computer running perfectly. This approach is fundamentally wrong, and setting up the paging file yourself will increase system performance.

Table of contents:

What is the Windows paging file and why is it needed?

Every computer has RAM installed, the purpose of which is to temporarily store data for quick access by the processor. The hard drive can also act as storage for quick access to data, but its speed is much lower than that of RAM. The paging file is an area of ​​the hard drive allocated for temporary storage of information. When free RAM runs out, the computer will write information to the paging file, and then can read it from there.

If we consider the operation of the paging file as an example, we can note the following scenario. When running several applications that actively consume RAM, some of them will be inactive (minimized). In such a situation, there is no point in storing them in RAM, thereby loading free space, and the Windows operating system will transfer inactive programs to the page file. Active programs will be in RAM in order to be processed faster. When the user accesses a previously inactive program, its data will be moved from the page file to RAM, and some information from RAM will be sent to the page file.

When your computer does not have enough RAM to store data and the page file is not enabled or configured incorrectly, applications may crash or blue screens of death may appear when you try to run a productive program.

How to choose the right page file size

As noted above, the paging file is free space on the hard drive that is used to store data for quick access. Large-capacity hard drives are inexpensive, and you might get the impression that if you set a large page file size on a fast HDD or SSD storage, you can minimize the amount of RAM installed in your computer, but this is not the case.

As practice shows, the Windows operating system, with a large paging file and little constantly occupied RAM, will access the hard drive more often. This will lead to the following consequences:

Accordingly, on each computer build you need to select the correct paging file size. By default, Windows is set to let the operating system independently choose how much memory to allocate to the paging file. This optimization method is not ideal, and it is better for the user to independently adjust the amount of allocated memory.

The correct choice of paging file size is influenced by many factors: the number of applications running simultaneously on the computer, the resource intensity of the tasks being performed, the number of programs running in the background, and much more. But first of all, you should focus on the amount of RAM installed in the computer, based on the following postulate: the less RAM in the computer, the larger the paging file should be.

If we take the average figures for the paging file size for computers, we can name the following values:

  • 1 GB of RAM: paging file – 2048-2048 MB;
  • 2 GB of RAM: paging file – 1512-1512 MB;
  • 4 GB of RAM: paging file – 1024-1024 MB;
  • 8 GB of RAM or more: no swap file needed.

By eliminating the paging file when you have a large amount of RAM, you increase the speed of your computer. This is due to the fact that the operating system does not have to access the disk, and all temporary data will be stored in RAM.

As you can see above, the size of the paging file is indicated in two numbers, for example, 1024-1024 MB. This is due to the fact that in Windows settings you can set the initial size of the paging file and the maximum one. On older computers, where hard drives did not exceed tens of gigabytes in size, it made sense to set the initial paging file size lower than the maximum. Now that disk space is not so expensive, it is better to choose identical values ​​for both columns. This is due to the following factors:

  • Similarly, the fragmentation of the hard disk partition allocated for the swap file is reduced;
  • The Windows operating system does not have to constantly recalculate the size of the paging file. Due to this, the number of disk accesses from the system is reduced, which improves the overall performance of the computer.

Important: Some applications in the Windows operating system require a paging file to be installed. If the computer is running without a page file, programs may simply not start. In such situations, the system will notify you of this, and you will need to make appropriate changes to your computer settings.

How to increase or decrease the page file

The paging file settings can be made on any version of the Windows operating system. To do this, you need to go to the virtual memory settings menu:


Important: If you have multiple hard drives installed on your computer, it is recommended that you create the paging file on something other than system media. An exception to this rule can only be if the system drive is a solid-state drive (SSD) with high operating speeds compared to other computer hard drives.

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.

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 size of the paging file for 512 Mb of RAM is 5012 Mb;
  • The optimal size of the paging file 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 page file, also called a swap file, is the computer's virtual memory. In some cases, its use is necessary. For example, you install a game on your computer that requires 4 gigabytes of RAM, and you have 2 gigabytes of RAM installed. It is when the RAM runs out that the operating system turns to the virtual memory, that is, the paging file.

Experienced users recommend disabling the paging file on your computer and installing additional RAM instead. This is due to the fact that reading virtual memory is not as fast as reading RAM, as a result, the computer will work a little slower.

If you don’t want to go to the store, but there is no RAM at home, then you can increase the RAM using a flash drive. Follow the link and read a detailed description of how to do this.

If you have never set parameters for the paging file before, then by default the operating system stores it on the disk where you have the OS installed, and itself determines its optimal size.

To increase the speed of your computer, it is better to place the swap file not on the partition of the hard drive where you have the operating system installed, but on any other one.

Swap file size It is recommended to choose based on the installed parameters - set the minimum size equal to the OP, and the maximum should exceed the OP twice. If you have 4 GB of RAM: set the minimum size to 4 GB, the maximum to 8 GB.

If you want to clear the Windows 7 page file before shutting down your computer, follow the link and read a detailed article about this.

Now let's look at the question - how to increase the size of the paging file in Windows 7.

First you need to find out where the page file is located on your computer. To do this, go to “Start” - "Control Panel".

In the next window, open the “System” section.

Here on the tab "Additionally" In chapter "Performance" Click on the "Options" button.

In the parameters window, go to the tab "Additionally" and in the section "Virtual memory" Click on the “Change” button.

My swap file is located on the C: drive. To move it to drive D:, I mark it with a marker "No swap file" and click “Set”. An information window will appear, click “Yes”.

Then I click on the D: drive and mark the item with a marker "Specify size" and set the initial and maximum size of the paging file. My RAM is set to 2 gigabytes, respectively, the initial size is 2 GB, the maximum is 4 GB. If you want, then set the maximum value higher, but keep in mind that the available amount of memory on the corresponding partition of the hard drive is also reduced by the same value. Click "Set". If all options are set, click OK.

An information window will appear in which we click “OK”, and for the changes to take effect, we restart the computer.

That's all. We figured out not only how to increase the Windows 7 page file, but also found out where it is located and what is the best size to choose for it.

Watch the video on the topic:

Rate this article:


top