VPS Basics

Understanding RAM allocation in Virtuozzo 4.7

With the upgrade to Virtuozzo 4.7, you may have some concerns that your server’s memory allotment has changed. For example, some customers have correctly noticed that the output of a top command shows a different allocation of memory than before the upgrade to 4.7.

Rest assured that none of the resources that have been allotted to your server have changed.

Your server still receives all of the resources that were available to it in previous versions of Virtuozzo. What has changed is simply the way some of these resources are reported. This reporting change was made in Virtuozzo 4.7 to better manage resources between containers.

There are three main changes to memory reporting in Virtuozzo 4.7.

  1. Your guaranteed memory is now displayed as “Mem” in a top command.
  2. Your burst memory is now shown as “Swap” in the top command. However, this isn’t swap in the traditional sense, it is still RAM and not disk. This classification change allows the kernel on the host machine to push less frequently used processes to “Swap.”
  3. The top command will now display cached memory much like a dedicated server does. Please keep in mind that while this memory is “used” it will be freed in low memory circumstances.

These changes have no effect on the amount of resources your server is able to use. In Virtuozzo 4.7 your server will have exactly the same amount of memory to use as it did before, and all of it is real memory and not swap to disk.

To see memory usage in real time:

To see memory usage run the free command in SSH (use the -m tag to view the results in megabytes).  Below is an example.

free -m
  			total	used	free	shared	buffers	cached  Mem:			11796	2302	9494	0	224	1199  -/+ buffers/cache:		877	10919  Swap:			8189	0	8189

The line that accurately describes the amount of memory being used and how much is available for future usage is the “-/+ buffers/cache:” line. This line removes buffers and cached from the “used” column of memory and adds “buffers” and “cached” to the “free” column in order to show the user exactly what is currently being used by system processes and what is available in reserve. As described above, the Swap line shows the amount of true burst memory that can be tapped if needed.

Photo by Chris Isherwood

Find out more about ServInt solutions
VPS

Starting at $27

  • The New York Times
  • The Hill
  • Bloomberg
  • The Seattle Times
  • Computer World
  • Ars Technica
  • MSNBC