Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Memory guarantees for Containers and Virtual Machines

2,090 bytes added, 10:13, 28 January 2016
Created page with "== Feature == Memory guarantees for Containers and Virtual Machines https://jira.sw.ru/browse/PSBM-42670 == Description == It's possible to define memory guarantees for bot..."
== Feature ==

Memory guarantees for Containers and Virtual Machines https://jira.sw.ru/browse/PSBM-42670

== Description ==

It's possible to define memory guarantees for both Containers and Virtual Machines. VCMMD must ensure dynamic memory configuration of Virtual Environments never screw up defined VEs memory guarantees.

How to set up memory guarantee for a VE:

# prlctl set VE --memguarantee [%]

Examples:

prlctl set VE --memguarantee 50
prlctl set VE --memguarantee auto

Note: "auto" is for default value (40% for VMs, 20% for CTs)

Unlimited Containers have [FIXME] % memory guarantees by default. (Virtual Machines cannot be "unlimited" by design.)

== Products ==

Virtuozzo 7

Packages:

* vcmmd-7.0.38-1
* vzkernel-3.10.0-229.7.2.vz7.9.29
* prl-disp-service-7.0.235
* prlctl-7.0.33
* vzctl-7.0.85

== Testing ==

* host RAM=X, total sum of currently running VEs = Y (Y<X)
You are trying to start a VE with memory guarantee Z (or increase the memory guarantee for existing VE to Z).

a) if Z > X - Y - min(X*0.05, 1Gb), operation should fail
b) if Z < (X - Y - min(X*0.05, 1Gb)) * 0.95, operation should succeed

* for each running VE, it should be able to allocate and use memory without OOM,
if total VE usage is not greater than VE's memory limit

* Attempt to set --memquota must fail (otherwise - broken expectations) and print reasonable error message,
like "This option is deprecated, please use —memguarantee instead".
https://jira.sw.ru/browse/PSBM-41963

== Known issues ==

* 'prlctl start VM' is the only way to start VM with memory guarantee
(In other words in case you start a VM via virsh, memory guarantees won't work for sure.)
https://jira.sw.ru/browse/PSBM-43106

== What was checked by developer ==

* cgroups' lowlimit never goes lower than memory guarantees set for a Container

== Feature owner ==

* vcmmd part - vdavydov at virtuozzo.com
* prlctl part - dandreev at virtuozzo.com
* dispatcher parts - shrike at virtuozzo.com, igor at virtuozzo.com, dandreev at virtuozzo.com
* vzctl part - igor at virtuozzo.com