Which paging file to set. What is a paging file

A paging file, also known as swap (in English swap), also known as virtual memory, is an operating system function implemented as a file into which some part of the amount of information is unloaded (written) RAM when it overflows. If the paging file is disabled, or if there is insufficient disk space allocated for it, unpleasant consequences may arise in the form of slowdowns and deep freezes of the operating system. Increasing the paging file can solve these problems.

Where is the swap file located? As a rule, unless a different location is assigned in the settings, the pagefile.sys page file is located in the root of drive C and is hidden. Size this file should not be less than the amount of RAM installed in the computer. Otherwise, it is recommended to check the settings and, if necessary, increase the disk space allocated for the paging file.

You can change the paging file size in Windows XP as follows:

  1. Right-click on the “My Computer” shortcut on the desktop. In the appeared context menu select “Properties”.
  2. In the window that opens called “System Properties”, go to the “Advanced” tab. In this tab, find the “Performance” section and click on the “Options” button.
  3. A window called “Performance Options” will open. In it you also need to go to the “Advanced” tab, in which, in the “Virtual Memory” section, click on the “Change” button.
  4. In the window that appears, named “Virtual memory”, select the “Custom size” option and specify the initial and maximum size of the paging file in megabytes. Click on the “Ok” button.
  5. As a result of the settings, the operating system should inform you that “in order for the changes made to take effect, you must restart the computer.”
  6. Reboot the computer, resulting in an increased size of the paging file.
In Windows 7 and Vista settings are very similar.

As for setting up the paging file, the following should be said:
  • It is advisable to set the minimum size of the paging file to one and a half times larger than the amount of RAM in the laptop. The maximum is four times the amount of RAM.
  • Using the page file, even if you set it to very large size, does not eliminate the need to increase RAM, since the speed of reading from disk is much lower than the speed of obtaining information from RAM. Fast SSD drives partially solve this problem.
  • If there are several disks on the computer, then it is best to organize the swap on the fastest one.
  • A good choice for configuring the paging file is the System Selected Size mode. IN in this case the operating system itself regulates the swap size based on its actual needs.
  • It is useful to periodically defragment the page file. But for this you need to use third-party software, since standard using Windows this cannot be done.
There is no universal solution for choosing the size of the paging file. It will differ both depending on the configuration of the computer itself and the set of programs that is used to perform tasks.

In essence, the page file is an “extension” of the computer’s RAM. All programs that run on a computer take up some amount of RAM: some require very little memory, while others require a significant amount of it.

If you simultaneously run applications that require a large amount of memory, it may not be enough. In such cases, virtual memory is used: Windows “moves” inactive applications from RAM to the page file.

Many of you will be outraged that working with hard drive happens slower than with RAM, they will say that you can’t do that, but everything is fine, nothing criminal happened: when used before active program the data about it will first move back to RAM, and only then the program will be executed further. This operation is integral to all operating systems.

You can also find the paging file on the disk itself: this is the win386.swp file in Windows directory for systems Windows series 9x/ME and the pagefile.sys file, which is located in the root of the disk where the system is installed, for WinNT/2000/XP.

Note: before searching for this file, you must set the system parameter - display hidden files and folders. Another attribute of this file is system. As a rule, files that are necessary for proper operation systems. This attribute is most often received boot files, drivers and configuration files.

So, we know where the swap file is and what it is needed for. Now you need to understand the optimal size of this file and how to configure it.

Initially, the size of the paging file depends on the tasks that the computer performs, but this is not the only parameter that affects its size. The volume also depends on the installed RAM in the computer.

Nowadays RAM has become cheaper, and many can boast at least four or eight gigabytes of RAM. Today, the role of the paging file is not as significant as it used to be, when the computer had 512 megabytes of memory, but we still talk about it - after all, not everyone has large volume RAM.

The size of the paging file should not be set very large, since there is a threshold after which the paging file simply takes up extra space on the hard drive and does not increase the speed of the computer.

For example, if you still use applications written under DOS, then it is advisable to make the page file larger, since DOS applications often have to use a large amount of RAM.

It is best to place the swap file on a fast hard drive (solid-state media is ideal for this task). If hard drive is divided into several partitions, but the swap file is best placed on the first one.

Historically, the Win9x/ME family made heavy use of the page file, thus unloading RAM (which was expensive in those days). Also the roads were small hard drives computers.

In this regard, Microsoft made the paging file dynamic (the file size increases according to the needs of Windows itself, and does not occupy a large volume constantly), but you can make the file occupy a static volume - in this case, the system will work with it faster due to the fact that you won’t have to constantly change the size of this file, and there will be no fragmentation on the disk.

Many people recommend that the page file size be equal to the amount of RAM. No one can tell you the exact size. Everyone acts at their own discretion. If the system has 512 megabytes of RAM, then the swap file should be at least a gigabyte in size. In this case it will be ensured best performance for everyday tasks.

If the memory capacity is more than a gigabyte, the swap size should be set to 1.5-2 times the size of the RAM. But there is an option when the page file does not need to be used so much: for example, a computer with eight gigabytes of RAM. The paging file size is usually a gigabyte, two at most.

So, let's measure the size of our swap file and add swap memory if necessary. In order to change the paging file, you need to go to “Computer”, click on empty space right click and select "Properties".

The “System” window will appear, where in the left top corner you need to find the link " Additional options systems." System Properties will appear. In this window, you need to go to the “Advanced” tab and find the “Performance” section there.

When opening “Performance”, the user will be presented with “Performance Options”. In the window you need to go to the “Advanced” tab. This tab has two parameters: “CPU time distribution” and “Virtual memory” - this is what we need now. Click on the “Change” button and, first, examine the parameters that are available to us.

To configure the paging file size manually, you must uncheck the “Automatically select paging file size” checkbox. Then the user will need to select the disk partition on which the swap file will be located, and move the switches below to manual selection this same size (the default is “Size by system choice”).

And at the very end indicate the minimum ( Original size) and the maximum size that the paging file will occupy on disk. For the system, at the very bottom of the window, the minimum file size, recommended and current size are displayed.

Many, after setting it up, will think: “How can I configure the paging file correctly and optimally?” There are several tricks that experienced users use:

  1. Let's imagine that you have several hard drives(not sections). In this case, it is best to install the paging file on a different drive than the one on which the system is located. In this case, performance will speed up.
  2. Important note: the minimum size of the paging file must be limited to at least one gigabyte. In this case, it will be possible to avoid fragmentation on the hard drive and, as a result, slowdown of the entire system.
  3. After any paging file adjustments, you must restart your computer to apply the changes and to start the defragmenter.

Interesting note: the page file contains a lot of information. When the computer is turned off, it may remain on the computer’s hard drive - this is no secret. But did you know that this file stores different passwords, logins and confidential information, which should not be shared? At a time when MS-DOS was more cost-effective, hackers could boot from this same DOS and, rummaging through the remains of the swap file, could find a lot of important (for you) information.

Thus, by following simple instructions, you can correctly configure not only the paging file, but also speed up your computer, saving yourself nerves and making the system work more stable.

For some reason it doesn’t work, but in general changing the size of the paging file will somehow affect the performance of the computer, your site was suggested on the forum, I read it here, I understand that the question is most likely uninteresting for you, but I still ask you to help . Sergey.

Windows 7 increase page file

Why is Sergei uninteresting, but very interesting? I will give you the maximum information about the paging file, and you can choose what you need. IN Windows 7 increase page file in some cases it is necessary, and also transfer it from the system disk to another.
A paging file or virtual memory, as well as a swap file, is created to increase the size of available RAM. In progress Windows operation 7 actively uses physical RAM, when it becomes insufficient, the operating system refers to the paging file it created on the hard drive, which always has the format pagefile.sys , using it as the missing one virtual memory. And if necessary, it always refers to this file, storing in it data that does not fit into the RAM.

  • Note: By Windows default 7 itself selects the size of the paging file and it is located on the disk with the operating system, but it would be better if the paging file was NOT located on the partition with Windows 7, this will improve performance. Also at the end of the article there is an example with illustrations of exactly how Enable the paging file cleanup feature when shutting down.

For your computer, the minimum size of the paging file or virtual memory should be equal to the amount of your physical RAM, and the maximum should be twice as large. For example, my computer has 2 GB of RAM, which means the minimum size of the paging file will be 2 GB, and the maximum 4 GB, exactly as in the screenshot.

  • Note: there is also an opinion that the size of the paging file must be strictly defined, that is, static (Initial and Maximum size are the same), under such conditions it will NOT be subject to fragmentation, which means it will not be able to slow down loading Windows 7. When dynamic file paging, in order to avoid a drop in performance, you need to enable the function of clearing the swap file when shutting down in the system settings; personally, I think this does not give much of a speed boost, just like constant defragmentation of the swap file (read on, all screenshots are given below).
  • Friends, in lately RAM has become affordable and if you have Windows 7 (8) 64 bit installed, and in system unit 8 GB of RAM is installed, then I would advise setting the size of the paging file By system choice. Many may object and suggest removing the page file completely, since 8 GB of physical RAM is sufficient. Personally, I advise you to experiment and if you think that your Windows runs faster without a page file, then check the box in the virtual memory settings No swap file.

In Windows 7, you can create a paging file on several drives at once, but increase productivity it won't lead. Is the sop file susceptible to fragmentation? And they ask this, the answer is not affected if its size is static and does not change, that is, you specified a certain size of the paging file, screenshots are given below.
IN Windows 7 increase page file, and you can also transfer it to any other Volume as follows.
Start ->Click right mouse on the Computer icon and select TV Properties, then-> Advanced System Settings.

Advanced tab ->Quick Actions and Options

and go to the Virtual Memory dialog box.

Next we see that the swap file is located on our system disk(C:), let’s move it, for example, to drive (E):, but first remove the paging file from drive (C:). Select the drive (C:), then check the box No swap file and click Set. This warning may appear, click Yes.

The swap file is an area of ​​the computer's hard drive (hidden system file), used to compensate for the lack of RAM. operating system temporarily places there fragments of programs and services that are in use at a particular moment. Data is placed and retrieved from the swap file as needed.

Using a swap file affects the speed of the application. Moving data to and from RAM is an order of magnitude faster than exchanging it with hard memory. Besides, frequent use paging file is fraught with data fragmentation. Therefore, it is more efficient to increase the amount of RAM memory than.

Setting up swap space

If it is impossible to physically increase the amount of RAM or to disable the page file, you will need to open its settings. To open the settings, you need to right-click on the “Computer” icon. The “Properties” item will appear in the menu.

In the “Advanced” tab there will be a “Performance” block; here you need to click on the “Options” button.

This will open the “Performance Options” window. Here, on the “Advanced” tab, there will be a “Virtual Memory” block with a “Change” button.

After clicking the “Change” button, a window will open to configure the paging file. Alternative option access to the settings is in which there will be a “System” item. Further actions are exactly the same as after opening “Properties” through the “Computer” icon.

This is where the settings will be made. During the setup process, a warning will appear stating that such parameters can only be changed by specialists. But you don't need to pay attention to them.

There are several important points, which this file must match:

  • its size should be set one and a half to two times larger than the amount of available RAM;
  • the smallest and maximum dimensions the swaps must match.
  • if you have several disks in your system, then you need to place the paging file on the fastest one;

Subject to availability sufficient quantity memory in RAM, the paging file can be completely disabled. To do this, you will need to have at least 6 GB of RAM “on board”. In addition, there is the possibility automatic detection paging file size. To do this, you just need to select the appropriate item in the page file settings window.

The changes will be applied after clicking the “OK” and “Apply” buttons. After this, it is recommended to restart your computer. This is not necessary, but you need to remember that the changes will take effect after a reboot.

On request at any search engine"file windows swap“You can get a thousand or two copied from each other, or slightly different answers on choosing the optimal sizes for pagefile.sys.

The most common advice looks something like this: for machines with small RAM, you need to set the paging file size to k*RAM, where RAM is the volume physical memory, k - some coefficient, of which there are many different ones. I met 1.5, and 2, and even 3. If the memory stick is 4GB or more, then “feel free to disable virtual memory in principle.”

The article is about whether you should believe this advice, and if so, then how much.

What is a page file?

pagefile.sys, also known as the paging file - a file representing virtual memory that allows simultaneous execution a large number processes that could not all fit into physical memory at once.
By default after Windows installations The page file grows automatically when the current volume is full.

If you disable the page file

If you try to disable the paging file in Windows 7, the system will display a warning window in which it will report unpleasant consequences:

It follows that you should not completely abandon the use of virtual memory, otherwise in the event of a crash you will not even be able to analyze the cause of the failure. The minimum size of 1MB indicated in the screenshot is taken from the calculation of the memory dump configuration in the “boot and recovery” settings:

If you select to record debugging information full dump, then the size increases by several orders of magnitude. For me it was 400MB.

In addition to the inability to write a dump, after disabling the paging file, annoying message about lack of memory. Its appearance will be accompanied by terrible brakes on resource-intensive applications.

If you move the swap file to another partition

A bunch of articles on optimizing your OS recommend moving the swap file to a separately created and formatted one in FAT32 hard section disk. This increases performance and reduces fragmentation of this file.

When performing such manipulations, do not forget that the swap file must be present in system partition for correct recording of debugging information. You have to choose between speed and the ability to collect data about troubles that have arisen.

Swap file size

Let's return to our oranges and the question of optimal size. Having dug through many articles, information publications and even Microsoft recommendations, I never found a clear and unambiguous answer to this question. And I wouldn’t have found it, as it became clear to me after reading the translation of Mark Russinovich’s article Overcoming Windows restrictions: virtual memory . In conclusion, I will provide links to the translation and the original, and now I will try to explain where to get the file size from.

To get started you will need Process utility Explorer, she is free analogue default Task Manager, but has many advantages. You can download it from the link.

After launch Process Explorer"a select the most memory-intensive applications that you use in everyday life, and run them all at the same time. In the Process Explorer window, press CTRL+I or select View/System Information from the menu; from the variety of data presented in the window, you need to select the Commit Charge area

The Peak value is the peak value of allocated memory for all applications, consisting of physical and virtual memory.

Next, we arm ourselves with a calculator and subtract the size of RAM from this value. If a negative value is obtained, we take the 400MB required by the system (there may be a different value) necessary to create a dump. If a positive value is obtained, we set the minimum value and maximum value swap file. You can play it safe and set the maximum higher “in reserve”, but then file fragmentation will increase if its size increases. Therefore, it is better to fix it in one place.