The paging file does not change in Windows 7. The optimal paging file size is Windows. What is a Windows swap file and why is it needed

Maximum performance of any computer provided by its four main components. These include: the central processing unit, RAM, processor and video card memory, and hard drive. Of course, this also includes a motherboard, because if the bandwidth of its interfaces and the bus frequency are not high enough, this will negatively affect the maximum performance of the computer as a whole. But at the moment we are interested in only one component of the computer, which plays one of the main roles in the play called "Computer Speed". And as is clear from the title of the article, we will focus on the paging file and virtual memory.

What is swap file? I think you have already guessed that this is a file. But why is it called a swap file and what is it for? The answer is very simple. If you use a large number of applications at the same time (for example, you have Photoshop, 3ds Max, a browser running and music is still playing in the background), the amount of RAM to process them may simply not be enough. And then the system refers to the file that is created on the hard disk (or hard drive) in order to use its space as the missing amount of RAM. This file, as it were, supplements, pumps up the amount of RAM with its size. That is why it got its name.

Taken together, the amount of RAM and the paging file are commonly referred to as virtual memory. That is, the amount of virtual memory consists of the amount of RAM and the paging file. I hope you understand. And sometimes it may happen that when working in some complex resource-intensive applications, you suddenly run out of virtual memory. In this case, not everyone will run to the store to buy an additional RAM bar to increase the amount of virtual memory. The easiest way is to increase the size of the paging file itself. Still, finding a couple of gigabytes of free space on your hard disk is much easier than buying additional "RAM".

Paging file is a file named "pagefile.sys" and is located by default on the system local drive "C". I suggest that you familiarize yourself with the configuration of this file. I experimented a lot and concluded that the location of the paging file on the system disk still negatively affects the speed of virtual memory. Therefore, I recommend placing it on another local drive, for example, on the "D" drive. To open the paging file settings, right-click on the "Computer" icon and select "Properties" from the list that appears. Alternatively, press the keyboard shortcut Win + Pause (where Win is the key with the Windows icon).


A window with basic information about your computer will open. Here, by the way, you can see how much RAM is installed on your system unit. We are interested in "Additional system parameters", where we go.

A small "System Properties" window will open. Here it is necessary to press the button “Parameters” in the “Additional” tab and the “Performance” area.

Another small window will open where you can configure the system performance parameters. We are interested in the "Additional" tab, and select it.

Here in the area " Virtual memory"Choose" Change ".

Another small window will appear, in which the swap file is configured. This is the so-called optimization of the Windows 7 system. So, I already said that it is best to place the paging file on any local disk, except for the system "C". To disable swap file from disk "C", just select it by pressing the left mouse button, set the switch with the left mouse button to the position "Without paging file", and then click the "Set" button.

You will immediately be notified that if you disable the paging file, debug data will have nowhere to write when a critical error occurs in the system. But do not worry, we will create the paging file immediately, only on another disk. Therefore, feel free to click the "Yes" button. That's it, we removed the paging file from the "C" drive.


Now I propose to place it on the "D" drive. Click on the "D" drive (you may have another drive, for example "E" or "F") so that it is selected. And put the switch in the "Specify size" position. The system recommends to set paging file size one and a half times the total amount of installed RAM (that is, if you have 4 Gigabytes of "RAM" installed, the paging file must be 6 Gigabytes). But I would not be in a hurry to do this in your place. The size of the paging file depends primarily, of course, on the amount of "RAM", and secondly, on what applications (or programs) you will use. Suppose you have 4 Gigabytes of RAM installed, and you basically do not use anything other than the Internet, watching movies and listening to music. In this case, a swap file of 2 Gigabytes will be, as they say, for the eyes. But if you will use resource-intensive applications and modern games, feel free to put 8 Gigabytes or even more.

It's not worth worrying too much, you can increase the size of the paging file at any time. I also recommend that you set the same value in the "Maximum size" and "Initial size" fields. In this case, the paging file size will be fixed. This is done to prevent fragmentation of the hard disk. But we'll talk about this in another topic. I would also like to draw your attention to the fact that the values ​​are entered in megabytes. Let me remind you that one gigabyte contains 1024 megabytes. Let's say we need to set the paging file size in Windows 7 to four gigabytes. Multiply 1024 by 4 to get 4096 megabytes. Enter this value in the "Maximum size" and "Initial size" fields and press the "Set" button. To save the set parameters, click the "OK" button.

A message appears stating that a computer restart is required to apply the settings. Click the OK button.


After that click the "Apply" button and then "OK".

In the next window, click "OK".

A small window will open prompting you to reboot. Click Restart Now.

After the reboot, the parameters you have set will operate, with which I congratulate you. Configuring Windows 7, or rather one of the many settings of the operating system, is over.

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

What is a paging file and what is it for?

However, RAM also has its drawbacks, of which the most significant 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 on hardware resources, are recorded in it. And when the user launches programs, the total amount of memory they require may exceed the amount of RAM available on board. In this case, there is a sharp drop in performance up to freezing of individual programs or even a system crash in BSOD.

To reduce the risk of developing such an unpleasant scenario, the developers created a special file in which the system dumps data that does not fit into RAM, and then, when part of the RAM is free, returns it back. It is called the paging 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 a whole lecture, but we will limit ourselves to such a 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 swap file and how large it should be

So, what is a swap file and what it is for, we hope you more or less understand, now is the time to move on to a more complex and interesting topic, namely its configuration. In truth, the Windows paging file does not need any special 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 at the root of the C drive, has the system name pagefile.sys and, like many system objects, the modification of which is unnecessarily undesirable, is hidden. So if you want to see it, uncheck the "Hide protected system files" checkbox in the folder settings.

If the paging file is at the root of the system drive, most likely you have it enabled. To make sure of this finally, open the command systempropertiesperformance"Performance parameters".

Next, switch to the "Advanced" tab and find the "Virtual memory" block, where the current paging file size 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 parameters window, check the "Automatically select the paging file size" checkbox in the next window, enable the "System selectable" radio button and save the settings.

It's that easy to put a swap file on Windows 7/10, but that's about 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 unequivocal opinion about the optimal size of the paging file. Traditionally, it is believed that its size 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 swap in Windows 7/10 when it comes to manually configuring it? It depends primarily on the amount of RAM, the capacity of the system does not play a fundamental role in this case. Given the individuality of the PC, we suggest using the following method to calculate the size of virtual memory. After running on your PC as many programs, tabs in the browser, etc., open the Task Manager, go to the "Performance" tab and write down the amount of RAM used.

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

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

However, it should be understood that the figures given here are also averages. There are examples when a paging file is required 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 in the background, it is recommended to increase the paging file size by 20-30 percent of the above values. On the other hand, if your computer has enough memory, you do not run "heavy" programs, you do not notice a decrease in performance, and you should not increase it. Three gigabytes of 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 to RAM, but to a slower swap file.

When is it necessary to increase the file size

With the question of what size of the paging file to set, we will assume that we figured it out, 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 you run a large number of programs and the appearance of the error "There is not enough memory on the computer."

It also happens that a program or game at startup requires a paging file of a certain size. Theoretically, it was said above how to increase the paging file in Windows 7/10, in practice it looks like this.

Let's assume that the amount of virtual memory we have is set at the choice of the system and we need to increase it. Using the systempropertiesperformance command, go to the performance parameters, click to change the virtual memory, uncheck the box for automatically determining the size of the paging file by the system and specify its own size. You don't have to bother with the original and maximum sizes, set the same values ​​in both fields, click "Set", save the settings and restart the computer. It's that easy to change the size of the Windows paging file.

Using a paging file on an SSD

The use of FP on SSDs should be discussed 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 writing of data shortens the life of the disk. Both of these statements are wrong. No matter how fast SSDs are, they are still significantly inferior in terms of RAM bandwidth and, if the latter is not enough at a certain moment, the user will immediately feel a decrease in system performance.

In addition, the amount 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 main patterns of using the paging file are perfectly matched to each other, 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 on the fastest! In addition, do not forget that disabling the FP will make it impossible to diagnose critical errors in the system (creating a dump of an emergency copy of memory).

So, do you need a swap file on an SSD? With more confidence, we can say yes, even if the system did not turn it on during installation. The exception is PCs with a very large amount of RAM (16 GB and higher), but even here everything is not always so simple. As for extending the life of SSDs by disabling / transferring the FP, there is some truth here, since the practice of using solid-state drives has clearly shown that their lifespan directly depends on the load on them.

However, it is not worth worrying about. If the PC has enough RAM, the paging file on the SSD will be used to a minimum, in addition, there are many other and at the same time more significant factors affecting the life of the SDD, among which should be noted defragmentation, hibernation, TRIM, indexing and other functions.

Well, hopefully, with the question of why a paging file is needed, we figured it out. Of course, there are still many subtleties in using it. For example, there are such points as transferring the FP from the system HDD to the user one, splitting, automatic cleaning, using special utilities for configuration, but this is already a topic for a separate article.

In cases where the computer does not have enough RAM, the Windows 7 paging file is used. You will find out where this file is located by reading the article. In addition, by following the advice of experienced users, you can determine the optimal size of the swap file required for correct operation of the OS.

In some cases it is not recommended to use this file at all, as it will affect the computer's performance. Therefore, the paging file is sometimes disabled. But first things first.

What is a paging file for?

There are situations when there is not enough RAM (physical memory). For example, you want to install a game that requires 4 GB of "RAM", but you only have 3 GB on your computer. In this case, the OS uses virtual memory, that is, the paging file (hereinafter FP).

It should be noted that today the cost of RAM is not very high, so it is better to purchase and install several strips of physical memory, since the virtual one is located on the hard disk and takes longer to read.

As a result, your computer will "slow down". In addition, due to such loads, the HDD or SDD will shrink.

However, if the FP is configured correctly, then it will not increase, "eating up" free space on the hard drive, besides, the fragmentation of the hard disk will be significantly reduced.

By the way, the paging file in Windows XP7 can be transferred from the C (system) drive to another drive, although some users advise against doing this.

Where is the swap file located?

It is located in one of the sections of the hard drive and is called pagefile.sys. This is why, if you want to see it, you will need to activate the visibility and files.

Click "Start" and open PU. Go to the "Folder Options" section, and then to the "View" tab. Scroll down the slider and set the checkbox opposite the "Show hidden files" function. Now click "Apply".

Now you can find the Windows 7 paging file. You already know where it is (the system disk partition). But it will not work directly with him. However, there is another way.

Deactivating the paging file

If you have a sufficient amount of "RAM" installed on your computer, then most likely you will want to deactivate the paging file in Windows 7. To do this, you need to right-click on the "My Computer" icon and select "Properties". There is another way - the "Start" menu, then enter the PU and open the "System" section.

On the left there is a menu where you will need "Additional system parameters". Here you are interested in the "Advanced" tab, the "Performance" subsection. Click on "Options" and select "Advanced" again. Click "Change" and in the window that opens, uncheck the box next to the option to automatically select the paging file. Check the option "No swap file" and confirm the settings by clicking "OK". Restart your OS.

So, you have learned where in Windows 7 the paging file is located and how to deactivate it.

Setting up a swap file

For the laptop or computer to work correctly, you need to properly configure the swap file. First of all, you need to know how much space to allocate for the Windows 7 paging file. You remember where it is located, so you can change its value yourself. Open the "Virtual Memory" section again and click "Specify Size".

Note: the maximum volume of the VP should be approximately 2 times the volume of the "RAM". It is better to set the original size the same as the maximum. Alternatively, specify the value that is indicated opposite the "Recommended" item.

Another important point is transferring the swap file from the disk on which you have the OS installed to another hard drive, which will increase the performance.

Now that you know what the paging file is for, the optimization should be straightforward.

  • It was already mentioned above that it is better when virtual memory does not take up space on the system hard drive, since it is already loaded. A separate hard drive is ideal.
  • If possible, install additional RAM strips so as not to use virtual memory. As a result, the operating speed of the OS will increase. For the "seven" 6 GB of physical memory is quite enough, which will not greatly shake your financial situation.
  • Set your own size for the swap file, as the system is constantly increasing it. This is the reason for the fragmentation of the hard drive. It is recommended that you set the same value for the maximum and initial amount of virtual memory.

By the way, the minimum FP size should not be less than 1 GB to prevent HDD fragmentation.

Conclusion

So, now you understand why you need a Windows 7 swap file, where it is located and how to configure it correctly. Of course, it would be better not to use a swap file at all, especially since now physical memory is not that expensive. However, if you have an old computer, which does not have additional slots for RAM brackets, then the use of a swap file in most cases is a necessity, since modern games and programs use a lot of "RAM".

As for optimization, then you can independently make all the settings, while following the recommendations of experienced people. It's not that difficult, so you won't have any difficulties. When communicating with experienced users, ask questions, and you will definitely get answers to them.

Good day, dear friends, acquaintances and other personalities. Today, let's talk again about what is swap file what is the correct size and why.

In the first part of this series, I wrote about what a swap file is, how to create it, what size it should be and where it should be located (i.e. that article contains a block of information necessary to read this one).

Somehow it so happened that the second part of the article will also touch on the paging file, namely, a number of subtleties for setting it up, paging file sizes for different memory sizes, and so on.

Paging file and size - theory

Experimentally, it was possible to prove that large paging file sizes are not good, or rather, often, even bad. With large file sizes and a busy RAM, the system increasingly refers to the paging file (i.e., to the hard disk), and not to the RAM itself, which, firstly, reduces performance (RAM is faster than a disk).

Secondly, this heavily loads the disk (which also affects performance because the disk is also engaged in other operations with files, and here it also has to tinker with the swap file).

What is enough?

  • This is when, when performing any tasks you need, there is always free RAM in the amount above 30% and the system does not swear that it does not have enough virtual memory;
  • In general, for example, I rarely noticed that 4 GB of RAM (even with a heavily loaded system with processes and games) had little free RAM, as well as with a heap of running applications in Windows there were some 8 GB problems. So why overload the disk by accessing the paging file and lose in performance?

Of course, many will say that they say, don't worry, put so much memory, and leave it free too .. I really don't know, if performance is more important to you, then the extra 100 rubles shouldn't bother you, since the price of RAM is now simply ridiculous (for at the time of this writing, 4GB 1600MHz DDR3 cost less than 1300 rubles), especially since the performance gain is obvious. However, to the point.

Paging file and sizes, practice: which are correct and why

In the course of a year's practice, I deduced a number of numbers for each amount of memory, so that it was possible to adequately set the paging file, relying on the number of RAM. Here they are.

  • 512 Mb 5012-5012 Mb;
  • 1024 Mb RAM, is the optimal paging file size from 4012-4012 Mb;
  • 2048 Mb RAM, is the optimal paging file size from 3548 - 3548 Mb;
  • 4096 Mb RAM, is the optimal paging file size from 3024-3024 Mb;
  • 8 GB RAM, is the optimal paging file size from 2016-2016 Mb;
  • 16 GB RAM (and more) - most often, without a paging file.

In fact, the more RAM you have, the less you need a paging file and the faster the system will work without it at all (by reducing disk access, as well as unloading data there, that is, everything will be taken directly from memory ).

  • Note 1. These dimensions are not extremely accurate and are recommended for everyone. Rather, it is a kind of average value for the majority, but it all depends on how optimized your system is, what you do on the computer, in what mode, etc., etc., that is, you can select the paging file specifically for yourself based on your needs and increase / decrease the value if necessary.
  • Note 2... Some applications (games, software, etc) require a swap file without fail, regardless of the amount of memory. In this case, the file should be kept even at 16 GB. Even more (by orders of magnitude) than the values ​​indicated above.
  • Note 3... The paging file is needed in large (different from the above) sizes if you minimize applications and switch to others, leaving the application (s) running (this is important), because often the unloading of minimized applications occurs in this very file. In this case, increase the swap .. Or add memory :)
  • Note 4... Recommendations do not apply to server operating systems and are strictly related to custom operating systems.

Personally, my opinion is that when the amount of RAM exceeds 6 GB, the paging file is not needed at all, which gives a tangible leap in system performance, extending the life of the hard disk and reducing its fragmentation.

The swap file and why we choose the same size

The paging file, like any other, tends to become fragmented, which raises the question of the need for defragmentation (about what defragmentation is and why you need to read it) in order to restore its former performance. However, there is a way to reduce the speed and strength of fragmentation of this file.

To do this, you just need to set the maximum and minimum sizes to be the same:

If you have any questions, I will be happy to answer them in the comments or with help.

PS: The last adjustment of the paging file size was made in August 2017, the data was checked on Windows 7, 8 and 10 (x64 bit).

Hello, friends!
Today we will talk about the so-called swap file.
What is a paging file and what is it for the operating system.

Where is it located, how to increase the paging file, and should you disable it?

In one of the previous articles I told that the reason for the slow operation of your system may be a lack of RAM (RAM memory), here is this article. There we talked about replacing RAM as a solution to this problem, but there is also a less radical method to increase system performance. We will talk about virtual memory and the so-called pagefile.sys file, also known as the paging file.

The paging file is created by the operating system itself specifically to increase the size accessible random access memory. In other words, when your system becomes insufficient in physical memory, it accesses this file, storing data in it that does not fit into the RAM. So to speak, to the RAM set aside for a "rainy day". The weaker your system, the more so-called "black days" it has. The paging file is the portion of the hard drive converted to missing RAM.

Sometimes you hear the opinion that owners of more than 4 GB of RAM do not need a paging file. I disagree with this opinion, the swap file is always needed. Some applications and system components use the paging file regardless of the amount of free RAM. In addition, in the event of a serious system failure, you can deprive yourself of the opportunity to analyze the failure by analyzing a memory dump.

This information is especially important for users who lack RAM. For example, if you only have 1 GB or even 2 GB when using Windows 7. By increasing the paging file you will simplify the life of your system and yourself.

And now from words to deeds. Computer - right mouse button - Properties. Advanced system settings - Advanced tab, section Performance - Settings. Advanced tab - Virtual memory - Change section. For a more illustrative example, see the screenshot.

Note: By default, the operating system chooses the size of the paging file itself and, as a rule, it is located on the disk where Windows is installed. It is more correct and efficient to place the paging file on the disk where no operating system installed... In my case, it will be disk (E :). This will allow you to get an increase in productivity.

Let's make more efficient settings. First of all, uncheck the option - Automatically select the size of the paging file. Next, select the item - Specify the size and select the Disk where the operating system is not installed. Relevant for systems where there are several hard disk partitions.

Next step. Please note that after the specified disk, there is an inscription on the disk (C :) - at the choice of the system, will not work. To change this, select Disk (C :) and the item - no swap file... Push Ask... Next, we will see such a warning window. Don't panic! 🙂

Since we have already set the paging file on another disk, on disk (E :), feel free to ignore this message and press the button Yes.