Windows 7 paging file optimal size. The optimal size of the Windows paging file. Access to paging file resizing features and optimization methods

Some terminology

RAM. Synonyms: RAM (Random Access Memory) – memory (storage device) with random access; random access memory device. When turned off, the data stored in is lost. As a rule, the larger the volume installed in random access memory, the faster the programs run.

Swap file (swap-file, paging-file) – file on hard drive ( pagefile.sys; has attributes Hidden, System), used Windows for storing parts of programs and data files that do not fit in RAM. As needed Windows moves data from the paging file to RAM (for use by programs) and back (to free up space for new data).

Synonyms: ;

; virtual memory file. Virtual memory

– a combination of RAM and paging file.(swapping)

– swapping into RAM the missing page of virtual memory requested by the program.

Windows If you see error messages caused by insufficient virtual memory, you must either increase the amount of RAM or increase the size of the paging file. , usually, automatically

controls the size of the paging file, but if the default size is insufficient to meet the needs of the system (or, conversely, excessive, which happens more often!), then it can be changed manually.

How to change the page file size Click;

Start -> Control Panel -> System - in the window Control Panel –> All Control Panel Items –> System select menu;

Start -> Control Panel -> System Advanced System Settings Properties of the system open the tab;

Additionally - In chapter Performance click the button…;

Start -> Control Panel -> System Options Performance Options open the tab;

Additionally open the tab Virtual memory click the button…;

Start -> Control Panel -> System open the tab Change uncheck the box;

Automatically select paging file size

– select the disk on which the paging file will be located; – set the switch;

Specify size – 3– in the appropriate fields, specify the initial and maximum size of the paging file in megabytes (for example, if the volume is GB set swap file size to 1024 MB

, – both initial and maximum); – press the button;

Set –> OK Advanced System Settings– a window will appear “You must restart your computer for the changes to take effect.”, press OK –> OK –> OK;

Set –> OK Microsoft Windows – a window will appear “You must restart your computer for the changes to take effect.”;

– save and close everything open files;

– close all programs you are running;

, – both initial and maximum); Reboot now.

How to optimize the page file

Windowsactively uses the paging file, significantly unloading RAM . By default (oh the proverbial !) Microsoft made the paging file dynamic, that is, the file size changes automatically, depending on the current need operating system, although the best system performance is achieved with a static file (it is not necessary to change the size of the paging file every time, its fragmentation disappears).

If you have 2 (or more) hard drives installed, it is recommended to move the page file from the drive where you have installed Windows, to another hard drive.

If you have one hard drive with a capacity of 2 - 3 – in the appropriate fields, specify the initial and maximum size of the paging file in megabytes (for example, if the volume is. Convert it to FAT32. Complete this section. Specify the location of the swap file on this partition. Use the entire volume of this partition only for the swap file.

Notes

1. Reading data from RAM is much faster than with hard drive, therefore, to increase performanceIncreasing the volume is preferable to increasing the size of the paging file.

2. sets the current size of the paging file, equal to the amount of installed RAM: if your size is 3 – in the appropriate fields, specify the initial and maximum size of the paging file in megabytes (for example, if the volume is, then the system will automatically set the current size of the paging file You must reboot for the changes to take effect.

Don't have enough random access memory (RAM) to surf the Internet or run a modern game? Before increasing its size, try setting up the swap file. It is quite possible that your PC or laptop will work much faster. Read below to learn what it is and how to enable the page file in Windows 7, 8 or 10.

First, a little theory. The swap file is special file ik, which Windows turns to if the PC does not have enough current RAM to operate. Simply put, this is virtual memory that is added to the current one, as a result of which the speed of the laptop or computer improves.

Let me give you a simple example. You want to run a game that requires 4GB of RAM. And you only have 3 GB. What to do in this case? Increase virtual memory and Windows will “take” the missing 1 GB from this special file. This way you can launch the game and play it.

Of course, there are several points here:

  1. Increasing virtual memory can slow down your computer. After all, the speed of access to RAM is much faster than to a hard drive (namely, the paging file is stored on it).
  2. Using this function creates an extra load on the HDD drive and reduces its operating time.

How to increase virtual memory in Windows 7

For this:

  1. Go to Start - Control Panel - System.
  2. Click on “Add. options".
  3. Find the Performance section and click on Settings.
  4. In the new window, select the “Advanced” tab.

This is where virtual memory is configured. As a rule, the one used on the this moment size (in the screenshot below it is 8173 MB, i.e. 8 GB). To increase virtual memory in Windows 7, click on the "Change" button.

The same window will appear where you can configure the paging file.

If your PC or laptop slows down, it means there is not enough RAM and it needs to be increased. To begin, uncheck this box. All buttons will become active and you can enable the page file in Windows 7 and configure it as you wish. To do this, check the box next to the “Specify size” line and write down the original and max. volume. For example – 4096 MB (that’s 4 GB).

Important: to avoid brakes and glitches, the initial and max. the size must be the same. For example, 4096 MB (as in the screenshot above).

By the way, what is the optimal size of the paging file? There is a lot of advice on this issue on the Internet, and the calculation formulas are also intricate.

The best option would be to increase your computer's virtual memory by 50% of your RAM. That is, the swap file for 4 GB will be 2048 MB. And for 8 GB of RAM you can specify 4096 MB. As a result, the total memory will be 6 and 12 GB, respectively - this should be enough for all occasions.

If your PC has a lot of RAM installed (for example, 8 GB), and you only work on the Internet, then you can completely disable the page file. After all, as I said above, it loads HDD, which sometimes slows down your PC.

However, this is not recommended. Perhaps after a while you want to start a game or video processing, and an error will pop up that there is not enough memory. And you will most likely forget about virtual memory. As a result, you will waste a lot of nerves before you fix this problem.

In general, if you need to increase virtual memory in Windows 7, specify it manually. And if you need to restore the previous values, check the very first box and close this window.

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 itself 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 swap file is in the root system disk, most likely, you have it turned on. 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 install the paging file in Windows 7/10, if we are talking about it manual setting? This depends primarily on the amount of RAM; the system capacity does not play a fundamental role in this case. Considering 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 at startup large number programs and the error “The computer does not have enough memory” appears.

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 automatic detection paging file size by the system and indicate 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. Whatever they are fast SSDs, they are still significantly inferior in terms of bandwidth RAM and, if the latter is insufficient 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 points as transferring FP from the system HDD to the user HDD, partitioning, automatic cleaning, using special utilities for configuration, but this is a topic for a separate article.

The paging file, or otherwise a swap file, is virtual memory located on one of the hard drives and is a “continuation” of physical random access memory (RAM). If, when an application is running, it does not have enough installed RAM, then Windows 7 uses a swap file to store application data, that is, it writes to and reads from it data that does not fit in RAM. This process of writing and reading is called swapping. In Windows 7, this file has a strictly defined name pagefile.sys, which cannot be changed.

With his Windows installation 7 independently determines the required size of the swap file and places it on system partition hard drive. It often happens that such system behavior regarding the size and placement of this file does not provide maximum computer performance. Therefore, the user has to configure pagefile.sys parameters himself and optimize its operation. We will try to highlight the most important points of this process.

It is believed that to obtain good performance, you need to set the minimum size of the paging file equal to the amount of RAM, and the maximum - twice as much. That is, if the computer has 2 GB of RAM, then the minimum and maximum sizes for the swap file should be set to 2 and 4 GB, respectively. Setting these two parameters to different values ​​causes the actual size of this disk storage object to change dynamically, which means it will be subject to fragmentation and reduce performance. Therefore, many users set the same values. In this case, pagefile.sys becomes static (not fragmented), which reduces the load on the system and increases its performance. But even in the case of a dynamic swap file, there is a way to eliminate the performance degradation if you enable file cleanup when the operating system shuts down.

Clearing the swap file when shutting down

To enable cleaning of the pagefile.sys file when the operating system is shut down, you must be in command line execute the command secpol.msc (“Start – Run”). In the window that opens, you should find the element “shutdown: clearing the paging file...”. Double click click on it, set the security parameter to “Enabled” and click the “Apply” button. These steps are shown in the following two figures.

Selecting the location of the swap file

Windows 7 allows you to place a swap file on several disks simultaneously, but this option does not increase system performance. The most optimal method in terms of performance is one paging file located on any partition of the hard drive except the system partition. To change the location of pagefile.sys, you must first delete it and then create it in the desired location. To do this, click “Start”, and then “My Computer – Properties” (right mouse button). In the window that appears, click on “Advanced system settings”.

A window will open in which you need to select the “Advanced” tab.

Here, in the “Performance” section, click the “Options” button and in the window that opens, select the “Advanced” tab again. Go to the “Virtual Memory” section and click the “Change” button. A window opens that allows you to set the location and size of swap files on any hard drive partitions. The same window allows you to both disable the paging file and enable it.

As already mentioned, by Windows default 7 places pagefile.sys on the system partition of the disk, as can be seen from the activated “Size by system” option. To transfer the paging file to another partition, select it, activate the “Without paging file” option and click the “Set” button. These actions remove the swap file from its previous location. Sometimes a message will appear warning you that the file has been disabled or its size has been set too small, which may cause problems. system error. At this message, simply click “Yes.”

Now let's move on to creating the file in the right place. For this:

  • Select the required disk partition.
  • Activate the “Specify size” item.
  • Set the file sizes (minimum to maximum).
  • Click the “Set” button.

All these steps are shown in the following figure.

In the above figure, the user has created a dynamic swap file whose maximum size is twice the minimum. If you need to create a static pagefile.sys, these parameters must be the same.

It should be noted that the swap file can be changed in size without changing its location. To do this, all the above steps must be performed without changing the disk partition. Of course, it goes without saying that in all windows with an “OK” button, you should press it after completing all the required actions. And one more thing: when changing the volume towards a decrease, the changes take effect instantly, otherwise a reboot may be necessary, about which the user will receive a message in which they need to click “OK”.

Disabling and enabling the page file

Many users often resort to disabling the swap file. This is justified in cases where the computer has sufficiently large RAM installed. Indeed, why waste time on swapping and reducing system performance if you can simply add one or more sticks of RAM. The cost of RAM at this time is not that high, but increasing the amount of installed RAM and disabling the page file can give a significant increase in performance, especially when not very powerful computer. Disabling a swap file is easy - to do this, just delete it by checking the “No swap file” checkbox, as shown in the penultimate figure.

Enabling a swap file is as easy as disabling it - just uncheck the “no swap file” checkbox and set “Size by system choice” or set your own values.

  • Needless to say, the ideal option would be sys located on a separate partition of the hard drive.
  • The user's financial situation will not be greatly affected if he installs additional RAM and abandons virtual memory altogether. This will increase the speed of Windows. 6 GB of RAM is quite enough for it.
  • Windows 7 constantly increases the size of the swap file, which leads to hard disk fragmentation and unnecessary overhead. Therefore, it is recommended to set your size with the same values for minimum and maximum sizes.
  • You should not set the size of this file to less than 1 GB, otherwise your hard drive may become fragmented.
  • A separate recommendation is required when used as a system SSD drive. This is a solid-state drive that does not have mechanical rotating elements. In essence, it is a large flash drive with a very high read-write speed, usually an order of magnitude higher than the speed of hard drives. But despite all its very good speed parameters, it has a limited number of write-read cycles. Therefore, it is very important to ensure a minimum number of overwrites to it, and for this you need to either disable the swap file altogether or make it static.

In contact with

Swap file (swap-file, paging-file) – file on hard drive ( pagefile.sys; has attributes Hidden, System), used Windows for storing parts of programs and data files that do not fit in RAM. As needed Windows moves data from the paging file to RAM (for use by programs) and back (to free up space for new data).
Synonyms: swap file; swap file; virtual memory file.
open the tab– a combination of RAM and paging file.
Swapping– swapping into RAM the missing page of virtual memory requested by the program.
If you see error messages caused by insufficient virtual memory, you will need to either increase the amount of RAM or increase the size of the page file.
Windows If you see error messages caused by insufficient virtual memory, you must either increase the amount of RAM or increase the size of the paging file. , usually, controls the size of the paging file, but if the default size is insufficient to meet the needs of the user and the system (or, conversely, excessive, which happens more often!), then it can be changed manually.

How to change the page file size

Let's go here: " My computer " - "Right mouse button " - "Properties " - "open the tab " - "Performance: Options " - "open the tab " - "Virtual memory: Change ". Uncheck uncheck the box
Select " – set the switch" and set the required values ​​in the fields " Original size" And " Maximum size ", press " Set ".
But first, I recommend reading the article to the end, because... increasing the paging file in some cases can even reduce Windows performance 7.
The thing is, it's not always large file swapping is good. On the contrary, if the page file size is too large, Windows will run slower. When the paging file is large, the system more often accesses not RAM, but the paging file located on the hard drive. And, as you know, the reading speed from disk is much lower than from RAM, therefore a large paging file slows down the computer and additionally loads the hard drive (which also reduces performance).
The optimal size of the paging file depends on the amount of RAM, I stick to the following table: For Windows 7:

512 MB RAM – 2560 MB
1 GB RAM – 1536 MB
2 GB RAM – 1312 MB
4 GB RAM – 768 MB
>6 GB RAM – no file

That is, the more RAM, the smaller the size of the paging file should be, so do not rush to increase it, it is better to use the table and select the optimal values.

How to disable the page file

Let's go here: " My computer " - "Right mouse button " - "Properties " - "open the tab " - "Performance: Options " - "open the tab " - "Virtual memory: Change ".

Select the disks one by one and press " No swap file " - "Set ". After the paging file is disabled on all disks, click " OK ". That's it, the paging file is disabled, the changes will take effect after restarting the computer.

How to move the page file to another drive

Let's consider the algorithm of actions if it is necessary to transfer the paging file from one disk to another.

1) Let's go here: " My computer " - "Right mouse button " - "Properties " - "open the tab " - "Performance: Options " - "open the tab " - "Virtual memory: Change ".
3) Select the drive on which the file is currently located and click " No swap file ".
4) Next, you need to click on the button " Set " and confirm the action in the window that opens.
5) Select the disk to which we want to transfer the paging file.
6) Select one of the operating modes:
"System selectable size " (automatic paging file size)
"Special size " (size specified by user)
7) To save changes, click " Set ", close all windows using the button " OK " and reboot the computer.

Page file optimization

Listed below are some recommendations for configuring the page file to improve Windows performance.

If the computer uses only one hard drive, it is better to place the paging file on the first partition.
If you are using two or more drives, it is better to move the file to the fastest drive or place it on multiple physical devices.
It is not recommended to create a file on several logical partitions of one drive; this will only significantly reduce system performance.
If you have several drives, it is not recommended to use older models for the swap file hard drives– this will also reduce the speed of the computer.