Increase Virtual Memory for Stat Programs

In my work, I run many models using gigabytes and larger datasets.  Even with 32GB of RAM, sometimes programs crash for lack of memory.  Since it is unlikely that my work machine will receive a memory upgrade in the near future, another option is to expand Windows virtual memory.  While this is unlikely to speed up the formulation of results, allows programs more memory space to run models.  

This workflow is for Windows 7.  It will work for Vista, but some of the steps are slightly different for 8 and 10.

 

image

 

  1. On the desktop, click Start
  2. Type control panel

 

image

 

  1. If the Control Panel looks like the above picture, click View by: > Small icons

 

image

 

  1. In the Control Panel, click System

 

image

 

  1. In System, click Advanced system settings

 

image

 

  1. In System Properties under the Advanced tab, click Settings…

 

image

 

  1. In the Performance Options popup, click Advanced tab
  2. On the Advanced tab under Virtual memory, click Change… button

 

image

 

Now there are various ways to change it.  This system has two drives. 

The C: drive is a smallish Solid State (SSD) drive.  While increasing the memory allocation here provides the fastest access time, there isn’t much space in a 256GB drive.  I normally either leave it as [System Managed] or remove it all together to increase space for programs.  If you are going to set it manually, try not to use more that 20% or so of the drive. 

The D: drive is a large traditional hard drive.  Because of its 2TB size and the fact that programs do not install here, it is a good place to store swap disks.  Again, the size should take up too much of the drive unless it is the only thing that will be on it.  Try 64GB to 128GB start and go larger if programs continue to crash.

  1. Click the drive name
  2. Click Custom size
  3. Enter the initial size (MB)
  4. Enter the Maximum size (MB)
    1. This don’t need to be the same, but I like symmetry.
  5. Click Set button
  6. Click OK to close the Virtual Memory Window
  7. Click OK to close the Performance Option Window
  8. Click OK to close the System Options window

Generally, Windows will ask for a reboot.  Do it at the first possibility to enable the suggestion.

Note:  For best results, if you use a traditional hard drive, defrag it first to give Windows a large contiguous block of space on the drive.  It may reduce thrashing.  This step is not necessary on a SSD.  Happy quanting