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

Article ID:360032831932
2 minute readKnowledge base
On this page

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.

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" https://support.microsoft.com/en-US/help/2021748.

  2. This article explains swap and page files in depth: https://www.petri.co.il/pagefile_optimization.htm.

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 https://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.