How to make a swap file on windows 7

Anonim

How to make a swap file on windows 7

The paging file is called a disk volume allocated to work such a system component as virtual memory. It moves part of the data from the RAM required to work as a specific application or OS as a whole. In this article we will talk about how to create and configure this file in Windows 7.

Create a paging file in Windows 7

As we have already written above, the paging file (pagefile.sys) is needed a system for normal operation and running programs. Some software actively uses virtual memory and requires quite a lot of space in the selected area, but in normal mode it usually happens to set a size equal to 150 percent of the volume installed in RAM PC. The location of pageFile.sys also matters. By default, it is located on the system disk, which can lead to "brakes" and errors due to the high load on the drive. In this case, it makes sense to transfer the paging file to another, less loaded disk (not partition).

Next, we simulate the situation when you need to turn off the paging on the system disk and turn it on the other. We will do this in three ways - using the graphical interface, the console utility and the registry editor. The instructions below are universal, that is, it does not matter from which drive and where you carry the file.

Method 1: Graphic Interface

There are several ways to access the desired management element. We will use the fastest of them - to "execute" string.

  1. Click the Windows + R key combination and write this command:

    sysdm.cpl

    Access to the properties of the system from the string to run in Windows 7

  2. In the OS properties window, we go to the "Advanced" tab and click on the settings button in the "Speed" block.

    Go to the settings of the speed parameters in the properties of the Windows 7 system

  3. Next, switch to the tab with the optional properties and click the button specified in the screenshot.

    Go to setting the parameters of the Punch File in the Windows 7 Properties

  4. If you have not previously manipulated virtual memory, the settings window will look like this:

    Default virtual memory settings in Windows 7

    In order to start the setting, you need to turn off the automatic control of the swap, removing the appropriate checkbox.

    Disabling automatic control file control in Windows 7

  5. As you can see, the paging file is currently located on the system disk with the Literary "C:" and has the size "by selecting the system".

    File size swaps by selecting system in Windows 7

    We highlight the disk "C:", put the switch to the "without paging file" and click the "Set" button.

    Disable the paging file on the system disk in Windows 7

    The system will issue a warning that our actions may result in errors. Click "Yes."

    Possible error warning when configuring paging file in Windows 7

    The computer does not reboot!

So we turned off the paging file on the appropriate disk. Now you need to create it on another drive. It is important that it was a physical medium, and the partition not created on it. For example, you have an HDD on which Windows is installed ("C:"), as well as it has created an additional volume for programs or other purposes ("D:" or other letter). In this case, the transfer of pageFile.sys to disk "D:" will not make sense.

Based on all the above, you must select a place for a new file. You can do this by using the Disk Management Settings block.

  1. Run the menu "Run" (Win + R) and call the desired tooling the command

    diskmgmt.msc.

    Go to snap control drives from the Run menu in Windows 7

  2. As we see, on the physical disk with the number 0, sections "C:" and "J:" are located. For our purposes, they are not suitable.

    List of partitions on the system disk in Windows 7

    We will transfer to one of the partitions of the disk 1.

    Choosing a physical disk to transfer paging file in Windows 7

  3. Open the settings block (see pp 1 - 3 above) and select one of the disks (partitions), for example, "F:". We put the switch to the "Specify Size" position and enter the data in both fields. If you are not sure which numbers indicate, you can use the tip.

    Setting the size of the paging file in the properties of the Windows 7 system

    After all settings, click "Set."

    Confirmation of the change in the size of the paging file in the properties of the Windows 7 system

  4. Next, click OK.

    Apply Paddock File Settings in Windows 7 Properties

    The system will offer to restart the PC. Here we press OK.

    Reboot confirmation when configuring paging file in Windows 7

    Click "Apply".

    Apply the settings of the paging file in Windows 7

  5. Close the parameters window, after which you can restart Windows manually or use the appeared panel. The next time you started a new pageFile.sys in the selected section.

    Restart the computer after setting up the paging file in Windows 7

Method 2: Command String

This method will help us configure the paging file in situations where for some reason it is impossible to do this using a graphical interface. If you are on your desktop, you can open the "command line" from the Start menu. You need to do this on behalf of the administrator.

Run a command line on behalf of the administrator from the start menu in Windows 7

Read more: Call "Command Line" in Windows 7

The console utility wmic.exe will help solve the task.

  1. For a start, let's see where the file is located, and what is its size. Perform (enter and press ENTER) command

    WMIC Page File List / Format: List

    Here "9000" is the size, and "C: \ pagefile.sys" - location.

    Getting information about the size and location of the paging file at the Windows 7 command line

  2. Turn off the paging on the disk "C:" by the following command:

    WMIC pageFileset WHERE NAME = "C: \\ pagefile.sys" Delete

    Disable paging file on the system disk from the Windows 7 command line

  3. As in the method with a graphical interface, we need to determine which section to transfer the file. Here, another console utility will come to your aid - diskpart.exe.

    diskpart.

    Run a DiskPart Console Disc from the command line in Windows 7

  4. "Please" to the utility show us a list of all physical media by completing the command

    LIS DIS

    Output of the list of physical media in the Windows 7 command prompt

  5. Guided by the size, we solve, to which disk (physical) will carry the paging, and choose it with the following command.

    SEL DIS 1.

    Choosing a physical disk DiskPart utility on the Windows 7 command prompt

  6. We receive a list of sections on the selected disk.

    LIS PART.

    Displays a list of partitions on the selected disk at the Windows 7 command line

  7. We will also need information about what letters have all sections on the disks of our PC.

    Lis Vol.

    Output list of partitions on all computer discs on the Windows 7 command line

  8. Now determine the letter of the desired volume. Here we will also help the volume.

    Definition of the letter section of the disk utility on the Windows 7 command prompt

  9. Complete the work of the utility.

    EXIT

    Completing the disk utility on the Windows 7 command line

  10. Disconnect automatic parameters.

    WMic Computersystem Set AutomaticManagedPageFile = False

    Disable automatic control file control from the Windows 7 command line

  11. Create a new paging file on the selected section ("F:").

    WMIC pageFileset Create Name = "F: \\ pagefile.sys"

    Creating a new paging file on the selected disk from the Windows 7 command line

  12. Reboot.
  13. After the next launch of the system, you can specify your file size.

    WMIC pageFileset WHERE NAME = "F: \\ pagefile.sys" set initialsize = 6142, maximumsize = 6142

    Here "6142" - a new size.

    Creating a new paging file of the specified size on the selected disk from the Windows 7 command line

    Changes will take effect after restarting the system.

Method 3: System Registry

The Windows registry contains the keys responsible for location, size and other parameters of the paging file. They are in the branch

HKEY_LOCAL_MACHINE \ SYSTEM \ CURRENTCONTROLSET \ CONTROL \ SESSION MANAGER \ MEMORY MANAGEMENT

Transition to the pitching file management branch in the Windows 7 Registry Editor

  1. The first key is called

    EXISTINGPAGEFILES.

    The system registry key is responsible for the location of the paging file in Windows 7

    He is responsible for the location. In order to change it, it is enough to enter the desired drive letter, for example, "F:". Click PCM on the key and select the item indicated in the screenshot.

    Transition to a change in the registry key responsible for the size of the paging file in Windows 7

    We replace the letter "C" to "F" and click OK.

    Changing the registry key responsible for the location of the paging file in Windows 7

  2. The following parameter contains data on the size of the paging file.

    PagingFiles.

    The system registry key is responsible for the size of the paging file in Windows 7

    Several options are possible here. If you want to specify a specific volume, you should change the value to

    F: \ pagefile.sys 6142 6142

    Here is the first number "6142" is the initial size, and the second is the maximum. Do not forget to change the disk log.

    Changing the registry key responsible for the size of the paging file in Windows 7

    If in the beginning of the row instead of the letter to enter a question mark and omit numbers, the system will enable automatic file management, that is, it is its volume and location.

    ?: \ pagefile.sys

    The second option of changing the registry key responsible for the size of the paging file in Windows 7

    The third option - enter the location manually, and configure the size to trust windows. To do this, simply indicate zero values.

    F: \ pagefile.sys 0 0

    The third option to change the registry key responsible for the size of the paging file in Windows 7

  3. After all settings, you should restart the computer.

Conclusion

We dismantled three ways to configure the paging file in Windows 7. All of them are equivalent to the result obtained, but differ in the tools used. The graphical interface is easy to use, "Command Line" will help you configure the parameters in case of problems or need to perform an operation on a remote machine, and the registry editing will allow you to spend less time on this process.

Read more