2,253
edits
Changes
Automated import of articles *** existing text overwritten ***
[<b>--ram </b><i>bytes</i>]
[<b>--swap </b><i>bytes</i>]
[<b>--vm_overcommit </b><i>float</i>]
[<b>--cpuunits </b><i>num</i>]
[<b>--cpulimit </b><i>num</i>]
[<b>--applyconfig </b><i>name</i>]
[<b>--applyconfig_map </b><i>group</i>]
[<b>--ioprio </b><i>num</i>][<b>--iolimit </b><i>mbps</i>][<b>--iopslimit </b><i>iops</i>] [<b>--save</b>]
[<b>--force</b>] [<b>--reset_ub</b>]
[<b>--setmode restart</b>|<b>ignore</b>]</p> </td></tr>
<b>--swappages</b> limit (the barrier is set to 0).</p>
<p style="margin-left:11%;"><b>--vm_overcommit</b><i>float</i></p> <p style="margin-left:22%;">Set VM overcommitment value to<i>float</i>. If set, it is used to calculate<b>privmmpages</b> parameter in case it is not setexplicitly (see below). Default value is <b>0</b>, meaningunlimited privvmpages.</p> <p style="margin-left:11%; margin-top: 1em">Note that<b>vzctl</b> checks if running kernel is VSwap capable, andrefuses to use these parameters otherwise. This behavior canbebe overriden by using <b>--force</b> flag before
parameters.</p>
<p style="margin-left:11%; margin-top: 1em">In VSwap mode,
all beancounters other than RAM and swap become optional.
Note though that if some optional beancounters are not set,
they are calculated and set by vzctl implicitly, using the
following formulae:</p>
<p style="margin-left:11%; margin-top: 1em"><b>•
lockedpages.barrier = oomguarpages.barrier = ram</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>•
lockedpages.limit = oomguarpages.limit = unlimited</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>•
vmguarpages.barrier = vmguarpages.limit = ram + swap</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>•
privvmpages.barrier = privvmpages.limit = (ram + swap) *
vm_overcommit</b></p>
<p style="margin-left:11%; margin-top: 1em">(if
<b>vm_overcommit</b> is <b>0</b> or not set,
<b>privvmpages</b> is set to "unlimited")</p>
<p style="margin-left:11%; margin-top: 1em">Here is an
configuration file.</p>
==== I/O priority management scheduling ====
<p style="margin-left:11%;"><b>--ioprio</b>
<i>priority</i></p>
<p style="margin-left:22%;">Assigns disk I/O priority to
container. <i>Priority</i> range is <b>0-7</b>. The greater
<i>priority</i> is, the more time for I/O activity container
has. By default each container has <i>priority</i> of
<b>4</b>.</p>
<p style="margin-left:11%;"><b>--iolimit</b>
<i>limit</i>[<b>B</b>|<b>K</b>|<b>M</b>|<b>G</b>]</p>
<p style="margin-left:22%;">Assigns disk I/O bandwidth
limit for a container. Value is either a number with an
optional suffix, or a literal string <b>unlimited</b>. Value
of <b>0</b> means "unlimited". By default a
container has no I/O limit. Maximum allowed limit is 2
gigabytes per second; values exceeding the limit are
truncated.</p>
<p style="margin-left:22%; margin-top: 1em">If no suffix is
provided, the <i>limit</i> is assumed to be in megabytes per
second. Available suffixes are: <br>
• <b>b</b>, <b>B</b> -- bytes per second; <br>
• <b>k</b>, <b>K</b> -- kilobytes per second; <br>
• <b>m</b>, <b>M</b> -- megabytes per second (default);
<br>
• <b>g</b>, <b>G</b> -- gigabytes per second;</p>
<p style="margin-left:11%;"><b>--iopslimit</b>
<i>iops</i></p>
<p style="margin-left:22%;">Assigns IOPS limit for a
container, in number of input/output operations per second.
Value is a number or a literal string <b>unlimited</b>.
Value of <b>0</b> means "unlimited". By default a
container has no IOPS limit.</p>
=== Suspending and resuming ===
global and per-CT scripts. Global scripts have a literal
prefix of <b>vps.</b> and are executed for all containers.
Per-CT scripts have a <i>CTID</i><b>.</b> numeric prefix and areexecuted for the given container only.</p>
<p style="margin-left:11%; margin-top: 1em">Please note
<pre style="margin-left:11%; margin-top: 1em"> # If one of these files does not exist then something
# is really broken
[ -f /etc/sysconfigvz/vz .conf ] || exit 1
[ -f $VE_CONFFILE ] || exit 1
# Source both files. Note the order is important.