6,534
edits
Changes
VSwap
,no need to set any secondary parameters
New [[Download/kernel/rhel6|RHEL6-based OpenVZ]] kernel has a new memory management model, which supersedes [[UBC|User beancounters]]. It is called '''VSwap'''.
Now you can set two primary parameters: <code>physpages</code> and <code>swappages</code>, while all the other beancounters become secondaryand optional.
* '''physpages'''
: This parameter limits the physical memory (RAM) available to processes inside a container.
: The <code>barrier</code> is ignoredand should be set to 0, and the <code>limit</code> sets the limit.
: Currently the user memory and the page cache are accounted into <code>physpages</code>.
* '''swappages'''
: This parameter limits the amount of swap space which can be used for processes inside a container.
: The <code>barrier</code> is ignoredand should be set to 0, and the <code>limit</code> sets the limit.
The sum of <code>physpages.limit</code> and <code>swappages.limit</code> limits the maximum amount
on the system.
==See also = Secondary parameters ==='''Even though these settings are classed as secondary, they are still important settings!''' In addition to <code>physpages</code> and <code>swappages</code> being set, it is ''currently'' recommended to: * Set <code>kmemsize</code> to no more than 1/2 of <code>physpages</code>* Set <code>dcachesize</code> to no more than 1/2 of <code>kmemsize</code>* Set <code>lockedpages</code> to no more than 1/2 of <code>physpages</code> VSwap CT config samples (like [http://git.openvz.org/?p=vzctl;a=blob;f=etc/conf/ve-vswap-256m.conf-sample ve-vswap-256m.conf-sample] that come with vzctl are currently implementing these recommendations. {{Note|VSwap feature is still being worked on, so these recommendation might change in the future.}} {{Note|As of 042stab042 and later kernels, you are not required to set kmemsize, dcachesize and lockedpages resources, so you can set those to unlimited. For more information, see Kir's blog post on the subject [http://openvz.livejournal.com/39765.htmlRecent improvements in VSwap].}}
[[Category: UBC]]