Article ID: 126161, created on Jul 12, 2015, last review on Jun 17, 2016

  • Applies to:
  • Operations Automation 5.5
  • Virtuozzo
  • Virtuozzo containers for Linux 4.7
  • Virtuozzo containers for Windows
  • Virtuozzo hypervisor

Question

How to set memory limit for containers?

For Virtuozzo (PVC\PSBM\PCS)

The new memory management model, which supersedes User beancounters is called vSwap

With VSwap, there are two required parameters: ram and swap (a.k.a. physpages and swappages). All the other beancounters become optional.

  • physpages

    This parameter sets the amount of fast physical memory (RAM) available to processes inside a container, in memory pages. Currently (as of 042stab042 kernel) the user memory, the kernel memory and the page cache are accounted into physpages. The barrier is ignored and should be set to 0, and the limit sets the limit.

  • ram

    is an easy shortcut for physpages.limit, and is measured in bytes

  • swappages

    This parameter sets the amount of "slower memory" (vSwap) available to processes inside a container, in memory pages. The barrier is ignored and should be set to 0, and the limit sets the limit.

  • swap

    is an easy shortcut for swappages.limit, and is measured in bytes

For example, the following command can be used to configure CT 777 with 512MB RAM and 1G swap:

# vzctl set 777 --ram 512M --swap 1G --save

Additional Information: Memory limits in Parallels Virtuozzo Containers for Linux

For Containers for Windows

Use the vzctl set command with the --vprvmem option. For example, to configure CT 101 with 500MB of RAM, the following command should be executed:

C:\Users\Administrator>vzctl set 101 --vprvmem 500 --save

NOTE: By default, pagefile management process occurs at node level, and there is no pagefile limit for Windows containers, but it is possible to emulate existence of paging file inside a container.

Search Words

set ram

vswap

swap

memory

how to

configure ram

Allocate 8GB on POA management node

0dd5b9380c7d4884d77587f3eb0fa8ef 2897d76d56d2010f4e3a28f864d69223 965b49118115a610e93635d21c5694a8 d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 0c05f0c76fec3dd785e9feafce1099a9 a26b38f94253cdfbf1028d72cf3a498b 5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 614fd0b754f34d5efe9627f2057b8642 5b048d9bddf8048a00aba7e0bdadef37 2554725ed606193dd9bbce21365bed4e

Email subscription for changes to this article
Save as PDF