KBEC-00075 - Correctly setting the Commander server Windows Virtual Memory or swap space

Summary

The Windows Virtual Memory, sometimes referred to as operating system swap space, is not always set correctly by default. Use these guidelines to set Virtual Memory for better performance.

Initial Settings

To find the current setting, go to System Properties > Advanced tab > Performance > Settings > Advanced tab > Virtual Memory to show "Total paging file size for all drives:," which displays something like 3839 MB.

If you do not want to allow Windows to automatically manage swap space, go to System Properties > Advanced tab > Performance > Settings > Advanced tab > Virtual Memory > Change. Initially set the swap space size to at least 1.5 times bigger than the amount of physical RAM.

What to check using Windows Task Manager

  • How much system memory is in use? This is displayed below the green bouncing meter labeled "Memory" in the new versions of the Task Manager, in the older below the "PF Usage".
  • How much physical memory do you have? This is displayed in the "Physical Memory" box value "Total". The newer versions of Task Manager display this value in "MB", the older in "K".

When the system memory in use is larger than the physical memory, the system is swapping.

The newer version of the task manager will show the "Physical Memory" percentage at the bottom of the display will be 100% when paging is occurring also.

Example

After you enter the range of 768 MB - 1 GB of installed RAM, a page file of 1.5 times the installed RAM may be a waste of hard disk space. The exception might be if you work heavily with multiple-user Commander servers, or database (http://www.theeldergeek.com/sizing_the_page_file.htm) and music or image editing programs that consume system resources far beyond the average workload.

Check the Commit Change Peak to see if you fall into this category, but it may be that a system with this amount of RAM can benefit from having the page file set to a 2 MB minimum lower limit and an upper limit equal to the amount of installed RAM, just in case the Change Total surpasses the Physical Memory Total.

The Commander server at Electric Cloud has its virtual memory set to 3 GB (3072 MB) on a system with 3.87 GB of RAM.

References

  1. Microsoft on "How to determine the appropriate page file size for 64-bit versions of Windows Server 2008 and or Windows 2008 R2" http://support.microsoft.com/kb/2021748.
  2. This article explains swap and page files in depth: http://www.petri.co.il/pagefile_optimization.htm.
  3. This article http://www.theeldergeek.com/sizing_the_page_file.htm describes how to read your system statistics using Task Manager.

Extra - On Linux

Sizing swap and measuring when it is in use:

  1. "vmstat -n 5". The si/so numbers show real time swapping activity.
  2. "free -m" is the easiest way to see true swap used. For explanation of the command "top" results which do not show true swap uses, see http://www.linuxatemyram.com

Other ways to examine and manage the memory health of a Linux system:

  1. "top" can sort processes by amount of memory used. Make sure the highest is the process you expect.
  2. "ps aux" show all processes memory use. Make sure the highest is the process you expect.
  3. "sar" shows iowait time. large iowait times show swapping is occurring.
  4. "sar -r" show the memory used over time
  5. "sar -q" show the load average over time. Reduce the load average to under 2 by adding more cores.
Have more questions? Submit a request

Comments

Powered by Zendesk