Configuring the swap file: tips and tricks

Many users of Windows-based computers are not even aware of all the components of the operating system that are hidden beyond Explorer. Most just have to be able to run games and browsers. However, to increase computer performance, you sometimes need to go deeper. For example, in the swap file settings. This is what will be discussed in the article. You can also find a lot of useful stuff, so we recommend that you read the material to the end.

What is this file?

First of all, it is necessary to explain what a swap file is in general, since most users simply do not know what it is about. If you explain in simple terms, this is a separate area on the hard drive of a computer, hidden from the eyes of the user. It is necessary for downloading files from RAM into it. Therefore, when the memory in RAM runs out, part of the data is transferred to the hard drive and stored there until subsequent use.

Naturally, the speed of information transfer between the processor and RAM is an order of magnitude faster than with a hard drive, however, if there is no swap file, then the data disappears altogether and the use of programs after overflow becomes impossible. It is important to understand that in most cases the page file is simply necessary, but it is also important to configure it correctly. This article will explain how to configure the page file for games.

Is it needed on an SSD

But before moving on to a detailed guide, it’s worth answering one more question: do I need a swap file on SSDs? Many may probably be surprised, but the drive does not play any role whatsoever, only the amount of RAM is important. Therefore, if you have more than 8 GB of RAM installed, and you do not run many programs on your computer at the same time, then you can refuse the swap file altogether.





But others are still interested in the question: on which drive is it best to place this same file - on the HDD or SSD? Here the answer is unequivocal: on an SSD. The fact is that a solid-state drive is many times faster than a hard disk; accordingly, unloading from it back to RAM will happen faster, which will speed up the computer.

Configuring the Windows swap file

We proceed directly to the correct setting. It’s worth mentioning right away that this operation requires some knowledge from the user, so if you don’t experience problems with the computer’s speed, it’s recommended not to change the system parameters. For the rest, detailed instructions will be provided below for correctly setting up the page file on different versions of the OS.

Windows XP

And we will start with how to configure the swap file on XP - a rather old, but no less popular operating system. Accordingly, to implement the plan, you must first start the settings window on the computer. We will do this through the "Control Panel":

  1. Click on the "Start" button located in the lower left corner of the screen.
  2. In the menu that appears, select "Control Panel."
  3. A menu appears where you want to select a category. Click on Performance and Maintenance.
  4. On the new page, click on the link "View information about this computer."
  5. In the new window, go to the "Advanced" tab and click on the "Options" button located in the "Performance" section.
  6. In the new window, you will again need to go to the "Advanced" tab.
  7. Then click "Change" in the "Virtual memory" settings block.
swap file setup




So we got to the desired settings window. Now we are ready to set up the page file on Windows XP. In fact, it is not so difficult to execute:





  1. In the corresponding window, select the disk partition on which the file will be located.
  2. Then select one of the use cases.
  3. If you select Custom Size, two fields will become active. In the "Original Size" enter the amount of your RAM. For example, if 4000 MB (1 GB) is installed, then enter this number. In the "Maximum size" field, enter a number 2000 more than the previous one.
  4. You can also not make any calculations and trust the system by selecting "Size at the choice of the system." Then Windows itself will scan the RAM and set the optimal settings for the page file.
  5. If you decide to refuse this file, then select the last item.
windows swap file setup




This is how simple it is to configure the swap file in Windows XP. Only after entering all the data do not forget to click "OK" so that all changes are saved.

Windows 7

Now let's move on to the most popular version of the OS - the seventh. Looking ahead, we’ll say that the instructions for setting up the page file in it are not much different from the previous one, except that you can open the desired window with the parameters in a slightly different way, and the name of some interface elements is different. In any case, we consider in detail the manual for the implementation of the task:

  1. Launch the file manager "Explorer". To do this, double-click on the computer icon on the home screen or the same icon on the taskbar.
  2. In the window that appears, pay attention to the top panel. There you need to click on the "Open Control Panel" button.
  3. A window will appear, depending on the viewing mode, it has a different display. So first of all, from the "View" drop-down list, select the "Small Icons" item. It is located in the upper right corner.
  4. In the list, find the item "System" and click on it.
  5. In the window of the same name that appears, click on the link "Advanced system settings". It is located on the left sidebar.
  6. A familiar window will appear, in which you need to go to the "Advanced" tab and click on the "Options" button in the "Performance" section.
  7. In the new window, click on the "Edit" button.
setting up windows 7 paging file




A window will appear with the parameters of the file we need. But it is worth noting that, unlike Windows XP, in the seventh version of the OS, you can set the mark "Automatically select the volume." If you do not want to tinker with the settings, then check this box. Otherwise, use the previous instructions for Windows XP.

Windows 8 / 8.1

We have already figured out how to configure the page file in Windows 7 and Windows XP, now the eighth version of the operating system is next in line. As in all previous instructions, first open a window with the parameters we need. For this:

  1. Go to the start menu. By default, it is located in the lower left corner of the desktop.
  2. In the list of all elements, find "Computer" and right-click on it.
  3. In the context menu that appears, select the "Properties" item.
  4. A window of the same name will appear, in which you need to click on the "System Protection" link. It is located on the left sidebar.
  5. A new window will appear, where on the tab "Advanced" you need to click on the first button in the list of "Options".
  6. Another window will appear, in which you will also need to first go to the "Advanced" tab, and then click on the "Change" button.

A window will appear in which you can configure the page file in Windows 8.1. As you can see, it is no different from what it was in Windows 7, so use the previous instructions to configure.

Windows 10

Well, let's move on to the last instruction on setting up the swap file, and it will be devoted to the Windows 10 operating system. You may already have noticed that each guide is practically no different, just like with Windows 10. The differences are directly in opening the desired window. And this time you need to follow the instructions below:

  1. Press Win + R on your keyboard.
  2. In the Run window that appears, enter the control command.
  3. Click OK.
  4. The "Control Panel" window will appear, in which you need to go to the "System and Security" section. Please note that the view should be set to Category. If anything, change it in the upper right corner.
  5. In the list of system partitions that appears, click on "System".
  6. In the left sidebar, click on the "More options" link.
  7. A window will appear in which, being in the "Advanced" tab, you need to click on the "Options" button. The desired one is in the "Performance" section.
  8. Another window will appear, in which you first need to go to the "Advanced" tab.
  9. There, click on the "Change" button, which is located in the "Virtual memory" section.
setting up the swap file in windows 10




So we got to the window we needed. As you can see, it is no different from those that were in other versions of the operating system. That is why if you want to configure the swap file in Windows 10, refer to the previous manuals. Otherwise, inexperienced users would be advised to check the box next to "Automatically select the size of the paging file." Often, Windows 10 correctly determines the amount of RAM installed in the computer and, starting from these indicators, sets the correct page file parameters.

Create a swap file through the "Command Line"

There is also an alternative way to change the page file. It, by the way, runs the same in all versions of the operating system, whether it be Windows 10 or even Windows 95.

Step 1: First Steps

First run Command Prompt. To do this, search the system and click on the RMB item of the same name. In the context menu, select "Run as administrator."

First of all, we find out the size and location of an existing swap file. To do this, run the following command:

wmic pagefile list /format:list
      
      



The results are interesting only two lines:

  • AllocatedBaseSize - size.
  • Description - location.

Now, to change the settings, you must disable the swapping of files from RAM. This is done with the following command:

 wmic pagefileset where name="C:\\pagefile.sys" delete
      
      



Step 2: work with the disk

setting up the swap file for games




The next step is to figure out the right section to move the swap file. In this case, it is necessary to use the console utility DISKPART. To run it, run the following command:

 diskpart
      
      



We find out the list of drives installed in the computer. To do this, use this command:

 list disk
      
      



Now decide on the disk on which the swap file will be located. The easiest way to do this is by comparing its size. After that, you will need to select it. To do this, enter:

 select disk <  >
      
      



We find out the list of partitions on the selected medium. To do this, run the command:

 list partition
      
      



We also recognize the letters of all sections. The team that will help us with this is as follows:

 list volume
      
      



Read all the information received and choose the name of the section to which the swap file will be moved. As a result, you will need to exit the DISKPART utility by running the command:

 exit
      
      



Step 3: change the page file settings

swap file proper setup




Getting started editing the swap file. First of all, you need to turn off the automatic control of all parameters. The following command is used for this:

 wmic computersystem set AutomaticManagedPagefile=False
      
      



Now you can specify the section on which the page file will be located. This is done with the following command:

 wmic pagefileset create name="< >:\\pagefile.sys"
      
      



After that, restart your computer and run Command Prompt again. It remains for us to set our own size of the page file. To do this, enter the following:

 wmic pagefileset where name="<   >:\\pagefile.sys" set InitialSize=< >,MaximumSize=< >
      
      



Note that all data is in megabytes.

swap file xp setting




After that, you will need to restart the computer for all the changes to take effect.




All Articles