How to set up smartphones and PCs. Informational portal
  • home
  • Iron
  • The virtual memory of the system. What is virtual RAM for?

The virtual memory of the system. What is virtual RAM for?

A client contacted us with the following problem: the computer often writes “virtual memory is running out”, especially after I work in Photoshop, and very voluminous work is obtained there. How to increase this memory?

Solution: Sometimes the amount of random access memory (RAM) may not be enough to start and run the program. In this case, Windows uses virtual memory. The physical representation of the swap file is the win386.swp file in the Windows directory for Win9x/ME and the file pagefile.sys in the root of the disk where the operating system is installed, for WinNT, 2000, XP? Vista 7 and 8.

What is virtual memory and how does it work?

Virtual memory or swap file (swap file) is a combination of RAM and temporary file storage on a hard drive or hard drive. If there is not enough RAM available, the data is moved to temporary storage called the swap file. Such a movement of data (both to and from the paging file) allows you to free up enough RAM to perform the necessary operations.

The performance of the computer depends on the amount of RAM, the more it is, the faster the programs function. If there is not enough RAM, then it can be increased by changing the size of virtual memory upwards. However, here it is necessary to take into account the fact that all data from the RAM is read much faster than from the hard drive. Therefore, the best option in this situation would be to add RAM.

Sometimes error messages may pop up due to lack of virtual memory. To ensure that software applications work properly, you must do one of the following: or .

Virtual Memory Out of Error Messages

If you receive error messages caused by insufficient virtual memory, you must either add more RAM or increase the size of the paging file to ensure that applications work properly. Typically the operating system Windows automatically controls the size of the paging file, but if the default size is not sufficient to meet the needs of the user, then it can be changed manually.

How to determine the required size of the paging file?

When determining the size of a virtual memory file, it is better to proceed not from the amount of RAM, but from the tasks performed on a given computer. To do this, you need to run some monitoring program that can register the size of the swap file (for example, the “System Monitor” built into Windows) and do typical work for this computer. The maximum size of the swap file registered during this session will be the required size.

Where to store the swap file?

If there are several hard drives in the system, then on the fastest of them. If the hard drive is divided into several partitions, then on the partition located at the beginning of the disk, however, this may not work for laptops, whose hard drives can arrange data not “by cylinders”, but “by surfaces”.

How to defragment the swap file?

The standard Windows defragmenter cannot move the swap file. Therefore, it is necessary to use utilities from other companies. For example, you can use the Speed ​​Disk from Norton Utilities, of course, as newer versions as possible.

Fixed paging file size

Windows actively uses the paging file, significantly offloading the computer's RAM. Microsoft has made the swap file dynamic, ie. the file size varies depending on the needs of Windows, although the best system performance is achieved with a static file. There are many reasons for this - Windows is not required every time resize the paging file, fragmentation disappears, etc. In order for its volume not to change, you need to set the values ​​\u200b\u200bof the minimum and maximum memory - the same. To do this, use the instructions below.

Add virtual memory?

This procedure is most often needed by people who have little physical RAM on their computer, and there is no opportunity or desire to buy a new RAM, and most likely a new computer.

The sequence of actions to increase the paging file:

  1. Right click on "Computer"
  2. Continue to "Properties"
  3. On the left, find and click: "Advanced system settings"
  4. Find and click: "Performance: Options"
  5. Click "Advanced"
  6. Find and click: "Virtual memory: Change"
  7. Select a drive that has a lot of free space.
  8. Please select "Specify size" below
  9. In the "Initial size" put the number in the size of the RAM
  10. In "Maximum" - 1.5 times the size of RAM
  11. Click "Set" and then OK.

In this way, you will increase the virtual memory of the computer to improve system performance. Perhaps this will help when the computer slows down and freezes while watching a video. It also treats the braking of the computer from the load of computer games.

Add Virtual Memory in Windows 7

If you receive low virtual memory warnings, increase the minimum paging file size. Windows sets the initial minimum page file size to the amount of installed RAM, and sets the maximum page file size to three times the computer's RAM. If you receive warnings when using these recommended values, you should increase the minimum and maximum sizes.

  1. Open the System component. To do this, click the Start button, right-click Computer, and select Properties.
  2. In the left pane, select Advanced system settings. If you are prompted to enter an administrator password or confirm it, enter the password or provide confirmation.
  3. On the Advanced tab, under Performance, click the Settings button.
  4. Click the Advanced tab, and in the Virtual Memory section, click Change.
  5. Clear the Automatically choose the size of the paging file check box.
  6. In the Drive [volume label] list, select the drive that contains the paging file you want to resize.
  7. Select the Specify size radio button, enter the new size in megabytes in the Initial size (MB) or Maximum size (MB) box, click Set, and then click OK.

Note

As a rule, after increasing the size, a reboot is not required. However, if the paging file size is reduced, you must restart the computer for the changes to take effect. Microsoft recommends that you do not disable or delete the paging file.

Tips for configuring virtual memory and swap file

  • If you have several hard drives, then installing the paging file on a different HDD than the operating system is installed usually significantly speeds up performance.
  • If you have several hard drives, then the paging file is placed on the fastest of them.
  • If you have several partitions on your hard disk, then the paging file should be placed on the very first of them - physically located very first, since access to these areas of the hard disk is the fastest.
  • It is best to limit the minimum size of the swap file to prevent excessive fragmentation of the swap file to about 1-1.5 times the size of your RAM. However, if you use graphics or the computer works as a database server, then you can put 2-3 RAM sizes in the size.
  • It practically does not make sense to limit the maximum amount, since this can lead to programs crashing due to lack of memory, and if you do limit it, then no less than 4 RAM.
  • After these settings, the computer must be restarted and run some kind of defragmenter (such as Norton Speed ​​Disk) to completely defragment the paging file and place it at the beginning of the partition.
  • Please note that after turning off the computer, the paging file may contain your passwords, logins, the remains of your confidential information, etc. This opportunity is sometimes used by uncles from the competent authorities and hackers, by booting into DOS and rummaging through the remnants of your programs in the swap file, they can find interesting things.

If you are going to upgrade your computer to improve its performance and speed, then you will face the difficult question of choosing RAM modules. Let's figure out how to increase the computer's RAM so that there are no compatibility problems, and the extra gigabytes really work.

Increasing physical memory

If there is an urgent need to increase physical memory, then the first thing you need to understand is which RAM bar is compatible with your motherboard. It is done like this:

The specification will look something like this:

From this information, we can deduce that the motherboard supports the DDR3 memory standard, dual-channel mode. The available maximum volume is 16 GB, the frequency is from 800 to 1800 MHz. The next step is to open the system unit and see how many free slots there are.

Remember that DDR, DDR2 and DDR3 are three different, incompatible formats. Therefore, if your motherboard supports the DDR2 standard, you do not need to buy DDR3 - the module will not fit into the slot.

At the end of 2015, the release of the DDR4 standard is announced - it is also better not to hurry with its acquisition, since the technology has not yet been tested. As for DDR5, reports of which can be found on the forums, such a standard does not exist at all. There is GDDR5 video memory, but it has little to do with RAM.

If the motherboard has a dual-channel mode, use two smaller sticks, not one larger one. Two 4 GB sticks will be about 15% more productive than one 8 GB module. When purchasing modules, try to choose the strips that are as close as possible in terms of characteristics. If you plan to buy a pair at once, it is better to choose a KIT-set consisting of two completely identical modules.

If you bring the amount of RAM to 8 GB, then do not forget to install a 64-bit system, because Windows x32 cannot work with memory that exceeds 4 GB.

Important parameters (apart from volume and standard) are frequency and timing. The higher the frequency, the faster the RAM will transfer data to the processor for processing and calculations. The lower the timing, the faster the RAM controller will respond to system commands. From this we conclude:

  • We select the maximum frequency that the motherboard and processor support (its frequency can also be found using the HWMonitor utility).
  • Timing (delay before request execution) we look at the minimum.

If the spread in price is significant, then it is better to take the bar with a high frequency and high timing. Latency does not affect performance so much, so you can sacrifice this parameter.

Virtual Memory

On Windows XP and later versions, virtual memory is enabled by default: a certain space is allocated on the selected hard disk partition, which the system accesses if there is not enough available RAM. Simply put, virtual memory (paging file) allows you to increase performance at the expense of the hard drive.

To set up virtual memory:


This path is relevant for the "seven", Windows 8 and Windows 10. On XP, the order is the same, only in the system properties you need to immediately open the "Advanced" tab. In the virtual memory settings window that appears, you can set automatic selection of the paging file size, specify the amount manually, or disable the function. Let's see in detail the independent setting of the amount of virtual memory:

  • The initial size is 1-1.5 the amount of physical RAM (if you have 2 GB of RAM, then put 2-3 GB of virtual memory).
  • The maximum size is 2 RAM.

These are the recommended parameters, but there is one subtlety: if you do not have an SSD drive, but a regular HDD, then the allocated volume will be fragmented. This affects performance badly, so in this case it is better to leave the initial and maximum sizes the same - equal to the volume of physical RAM modules.

If the swap file has already been fragmented (its size has been dynamic for a long time), then you can't just resize it. You need:

  1. Set to "No paging file".
  2. Reboot the system.
  3. Reopen the virtual memory settings and specify the size of the paging file.

You will get a swap file that will not be fragmented and will help to slightly increase the performance of the computer.

Using a flash drive

You can increase the available amount of RAM using a flash drive. In fact, this is the same paging file, only it is located on a removable drive, which reduces the load on the hard drive. The technology that allows you to increase the amount of virtual memory using a flash drive is called Ready Boost. For its use, several conditions must be met:

  • Windows 7 or later installed.
  • You are using an external drive (SSD drive, USB flash drive, SD card) that is larger than 1 GB.
  • The speed of the flash drive is at least 3 Mb / s (all modern flash drives easily reach this indicator).

If you are using a flash drive larger than 4 GB, be sure to format it to NTFS. The optimal amount of removable disk used should be 2-3 times the physical size of RAM. For example, with 4 GB of RAM, it is desirable to use an 8-16 GB flash drive.

  1. Connect the removable drive to your computer.
  2. If an autorun window appears, select "Speed ​​up the system".
  3. If autorun is disabled, go to "Computer" and open the properties of the connected flash drive.
  4. Go to the "Ready Boost" tab.
  5. Check the box "Give this device" and specify the amount you want to allocate for creating a cache file that expands virtual memory.

If you want to allocate the entire available volume of the flash drive, then check the "Use this device" box.

Important: do not disconnect the flash drive after activating Ready Boost technology. Go to the properties and check the box "Do not use this device", after which you can remove the drive.

Can I seriously improve my computer's performance with Ready Boost? The question is debatable. According to some reports, system performance increases by a third, but this is the maximum effect that is achieved when performing simple operations. A significant increase should not be expected, since a number of other factors affect performance, including processor power.

To increase the amount of available RAM, the computer uses virtual memory by writing a certain amount of RAM data (for example, 1834 MB) to the hard drive, in the paging file. The system can then access this data as needed.

RAM(Eng. Random Access Memory, random access memory; computer jargon. Memory, RAM) is a volatile part of a computer memory system that temporarily stores data and commands necessary for the processor to perform an operation.

Windows 7 writes paging files to hard drives in the format pagefile.sys.

An initial paging file is created automatically for the drive on which the operating system is installed. By default, there are no swap files on other drives, but you can create them manually. However, in most cases this will not be necessary, since placing paging files on multiple drives does not necessarily improve performance.

In Windows 7, automatic virtual memory management works much better than in previous versions. Typically, Windows 7 allocates an amount of virtual memory equal to the computer's RAM. This prevents page file fragmentation, which would degrade performance.

Data fragmentation - a process in which a file, when written to disk, is divided into blocks of various lengths, which are written to different areas of the hard disk. The opposite process is defragmentation.

You can manually adjust some settings. You will most likely want to limit the amount of virtual memory. To do this, you can set the initial and maximum size of the paging file, which also helps to avoid fragmentation.

In most cases, the optimal page file size will be twice the amount of system RAM. For example, for a computer with 1024 MB of RAM, it is better to have at least 2048 MB of total paging files on all disks.

However, if your computer has more than 4 GB of RAM, you can set the paging file size to be 1.5 times larger than the RAM. For example, for a computer with 6144 MB of RAM, it is better to have at least 9216 MB of total paging files on all disks.

For optimal performance, the minimum page file size should be equal to the amount of RAM, and the maximum size should be equal to the amount of RAM times 1.5 to 2. The advantage of limiting the page file size is that the system initially allocates a certain amount of this memory and does not should increment it as the user launches programs.

To configure virtual memory settings, follow these steps:

1. Click the Start menu button and select Control Panel.

Start Menu - Control Panel

3. Open the System window. At the bottom left, click the link Performance counters and tools.

System window - Performance counters and tools

5. On the Advanced tab, click the Change... button, and the Virtual Memory dialog box will appear on the screen, in which you will find the following information.

Change... button

  • Disk [volume label] and Swap file (MB). Shows the current virtual memory configuration. The dialog box lists all volumes with their respective swap files (if any). For paging files, the initial and maximum sizes are listed.
  • Size of the swap file for each drive. Shows information about the selected drive (in particular, the amount of free space) and allows you to change the size of the paging file on it.
  • The total size of the swap file on all drives. Shows the recommended amount of virtual memory and the amount of virtual memory currently allocated.

6. By default, Windows itself determines the size of the paging files. If you want to set this option manually, clear the Automatically choose the size of the paging file check box.

7. In the Disk list, select the volume to configure.

8. Select Specify Size, then enter the original and maximum dimensions.

10. Repeat steps 6-8 to set up all volumes.

11. Click the OK button. If the system prompts you to overwrite the existing pagefile.sys file, click Yes.

12. If you have changed the settings of the paging file that is currently in use, you will see a message that you need to restart the computer for the changes to take effect. Click the OK button.

13. Click OK twice to close all dialog boxes. The system will prompt you to restart Windows. Click the Restart Now button.

To have your computer set everything up automatically, follow these steps:

2. Open the System window. At the bottom left, click the link Performance counters and tools.

4. On the Advanced tab, click the Change... button, and the Virtual Memory dialog box will appear on the screen.

5. Select the Automatically select paging file size check box.

6. Click the OK button twice to close all dialog boxes.

Virtual memory partially improves system performance because virtual memory frees up main RAM to store only actively used applications.

Active memory areas are stored in RAM, while less active ones are moved to virtual memory and stored on one of the hard disk partitions. Accessing virtual memory always causes a delay, and visually it looks like the system is thinking for a few seconds.

If your amount of RAM does not exceed 2 GB, and you regularly notice such phenomena, then there may not be enough RAM for all the applications and services running on your computer.

How to know if your PC is running at the limit of its RAM capacity?

To do this, display a gadget on the desktop that displays the load of RAM and processor. To do this, do the following:

1. Move the mouse pointer on the desktop to an empty space and click the right mouse button. Select Gadgets from the context menu.

Context Menu - Gadgets

2. In the window that appears, select the CPU Gauge gadget.

3. Close this window.

The desktop will display a CPU load indicator and the amount of RAM used.

The smooth operation of a computer is ensured by many factors, and virtual memory plays an important role in this complex system. If the processor often uses 32 or 64 MB of RAM, then, of course, at high speed this memory is not enough, and virtual memory comes to the rescue. Virtual memory helps you copy applications that you haven't used for a long time to your hard drive, freeing up the necessary space for new data. Often, when the system is running, we notice that the performance drops, which means that we need to take measures to clean up and increase the amount of virtual memory.

At the first sign that your computer is slowing down, you need to make sure that you have enough virtual memory. As a rule, a message about this trouble appears in the lower right corner of the screen. The amount of memory can be increased by accessing the paging file, which is named "pagefile.sys" in the directory. In this case, you need to open the "System" folder in the "Control Panel" menu, the "Advanced" tab. In the "Performance" tab, select the "Settings" column and the "Advanced" tab. In the "Virtual Memory" section, you can see the amount of available memory at the moment. To increase it, you must click the "Change" button and enter a new value in the box. It is recommended to increase the size of virtual memory no more than twice (for example, from 2048 MB to 4096 MB). Selecting the "Custom size" option, set the initial size and maximum size, click the "Set" button. Having set the size of the paging file on one of the hard drives, it must be turned off on the rest. You need to go in turn to each of the other sections and put a checkmark in front of the option "No paging file" and click the "Set" button. From time to time it is necessary to clear virtual memory in order to preserve confidential data from paging files. The system provides a special program, but it is usually inactive, so it is recommended to enable it.


To clear virtual memory, you need to go to the "Start" menu, go to "Settings" and go to the "Control Panel". After opening the "Administration" tab, select the "Local Security Policy" folder, go to the "Local Security Settings" window. Right-click on the column "Shut down: clear the virtual memory file", select "Properties" and in the "Turn off" option, click the "Apply" button, then click "OK". Be prepared for the fact that the computer should be restarted twice, after which the virtual memory and paging files will be completely cleared.


Only by systematically checking the parameters of the computer, you can be sure that at the most inopportune moment it will not let you down. By cleaning the system of unnecessary data, you contribute to a clearer and faster computer, without waiting for messages saying that there is not enough virtual memory.

Virtual Memory acts as a complement to RAM, and forms part of the RAM and hard drive. This gives the user the feeling, while the program is running, that he has unlimited RAM, and that he has defragmented working memory. Virtual Memory has become commonplace for most computer operating systems. Computers these days have data memory (RAM) available in various sizes. Considering the huge demand placed by computer users for software applications, this space is not sufficient. Also, users expect all these programs to run at the same time, which is not possible within the available space. Therefore, there is a need for virtual memory.

What it is?
This is a technique that has its own tricks for applications and programs, assuming they have a contiguous address space and an unlimited amount of working memory. Although the fact that memory can be physically fragmented to store data on disk. Systems that use virtual memory are able to run large applications at fast speeds and use RAM more efficiently than without it. Virtual memory is different from the concept of memory virtualization.

How virtual memory works
This is a smart way of using a computer's actual memory capacity and manipulating it with a combination of operating system and memory using hardware capabilities. It acts as a temporary storage medium in which data is stored in a file format. Since the operating system acts as a determinant, it provides fast access to data and enables smoother scale-up of work capacity. Virtual memory works in coordination with RAM to store and present data quickly to fulfill the requirements of application programs. Secondary storage devices, such as a hard drive with a large amount of memory, provide very slow access to data.

How is virtual memory arranged?

It is organized either as swap file or segmentation. Most systems use page tables to translate the virtual addresses of application programs into physical addresses used by the processor to execute instructions. The table stores entries for mapping a virtual address to a physical address. Systems may have one table page for the entire system, or separate table pages for each application. Thus, the swap file can be defined as the process of moving inactive virtual memory pages to disk and restoring them to real memory on demand. There are various algorithms to choose which pages should be transferred to the hard disk and which should be kept. Very few systems use the concept of segmentation to implement virtual memory. In segmentation, memory is divided into variable segment sizes. The segment number and offset within it together form a virtual address. If the processor wants a particular data element, it first looks up its segment number in the table to find the segment descriptor. The segment descriptor contains information that is an offset within the segment and is less than the length of the segment, and if not, an interrupt is generated to tell where the segment is. If the processor is unable to find a segment in main memory, it generates a hardware interrupt, prompting the operating system to access the swap file in the segment. The operating system looks for segments that have not been in use for a long time and swaps them out of main memory to make room for new segments to be read. How to increase virtual memory?

Here is a step by step guide on how to increase the virtual memory of your computer. (Only for Windows OS):

Click on the start menu and then go to the control panel.
Select performance and maintenance, and under that, make a system selection.
Select options on the Advanced tab in the section titled "View".
On the Advanced tab, under Virtual Memory, select Change.
In the [volume label] drive list, select the drive that contains the paging file you want to resize.
In the Paging file size for the selected drive section, select the check box in - custom size.
You can choose the amount of memory you want to reserve for virtual memory by entering the initial and maximum size.
Click on set button
Restart your computer when prompted.

If you find your computer running slowly, then increasing virtual memory will not help, as it may simply be the result of 'overloading' the computer. Shuffling blocks of virtual memory between RAM and disks consumes most of the computer's time, thus causing thrashing. While well-designed programs can help solve this problem to a certain extent, the ultimate cure is to install more RAM.

(No ratings yet)

Top Related Articles