Overview of Virtual Memory
Virtual memory is the reserved space in the system drive of the hard disk, and is used to temporarily save the information that physical memory (RAM) cannot hold because of its limited capacity.
Concept of virtual memory was first introduced with the release of Windows 9x operating systems where some amount of disk space in the system drive was reserved by the operating systems. This disk space became unusable for the users and was only used by the operating system as virtual memory.
With the release of Microsoft Windows 2000, the concept of paging was introduced where pagefiles were used as virtual memory. Modern OS’s manage memory by diving up its space into blocks called “page”, which is a fixed and the smallest size of unit. Pages are allocated for application software. Page size varies depending on hardware such as CPU. The general page size for Intel based PCs is 4KB. Pagefiles are still used by all Microsoft Windows operating systems till date. Pagefiles have advantages over reserved disk space in a way that the information that is sent to the virtual memory is divided into pages before it is transferred to the pagefile. This process is technically knows as Page-Out. Page-out remarkably increases the efficiency and speed of the operating system.
How Virtual Memory Works?
In a computer where Windows 2000 or above operating systems are installed, it is expected that the operating systems will be used for multitasking and therefore users are expected to open several applications simultaneously. If the computers have sufficient amount of physical memory (RAM), everything goes quite well. However if the applications opened by the users consume additional memory, inactive applications in the physical memory are then divided into pages, and once segmented, the pages are transferred to the pagefile (virtual memory) in order to make some room in the RAM for the newly opened applications. When users need to access inactive application that was earlier sent to virtual memory or pagefile, the required application is then transferred back to the RAM. On the other hand if the RAM cannot hold the application because of its limited capacity the application stored in the RAM is transferred to the pagefile or virtual memory. This process is known as ‘Paging’.
By default in Microsoft Windows 7 virtual memory is managed by the operating system itself and no administrative interaction is required at all. However there might be times when users might experience decreased performance by the operating system while playing high graphics games. In such cases a notification appears in the system tray displaying “Low virtual memory” message. When this happens administrators must manually specify the minimum and maximum size of the pagefile.
Minimum recommended size of the pagefile is 1.5 times of the physical memory (RAM) and can exceed up to 4 times at the most. For example if a computer has 1 GB of physical RAM installed in it the size of pagefile (virtual memory) can minimum be 1.5 GB and can go up to maximum 4 GB.
Managing Page File Size
Since the task requires elevated privileges, administrator account must be used in order to manage pagefile size manually. Administrators must follow the steps below to do so:
- Log on to Windows 7 computer with any account that has been added to Administrators group.
- Once logged on, click Start and from the appeared menu, right-click Computer.
- From the context menu, click Properties and on the opened window from the left bar, click to select Advanced system settings option.
- On System Properties box, make sure that Advanced tab is selected, and under Performance section click Settings button.
- On Performance Options box, go to Advanced tab and under Virtual memory section, click Change button.
- On the opened Virtual Memory box, uncheck Automatically manage paging file size for all drives checkbox.
- Once done, if not selected, click to select Custom size radio button and populate Initial size (MB) and Maximum size (MB) fields with minimum and maximum pagefile size according to the size of physical memory (RAM).
- Finally click OK buttons on all the opened boxes and restart the computer to allow the changes to take effect.