Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

VSwap

517 bytes added, 00:02, 2 October 2013
Convert non-VSwap CT to VSwap: add a script
# Add PHYSPAGES and SWAPPAGES parameters to config. Easiest way is to use <code>vzctl set $CTID --ram N --swap M --save</code>
Now your config is vswap enabled, and when you (re)start it(or use <code>--reset_ub</code>), vswap mechanism will be used by the kernel for this CT. Here is an example of the above steps:  CTID=123 RAM=1G SWAP=2G CFG=/etc/vz/conf/${CTID}.conf cp $CFG $CFG.pre-vswap grep -Ev '^(KMEMSIZE|LOCKEDPAGES|PRIVVMPAGES|SHMPAGES|NUMPROC|PHYSPAGES|VMGUARPAGES|OOMGUARPAGES|NUMTCPSOCK|NUMFLOCK|NUMPTY|NUMSIGINFO|TCPSNDBUF|TCPRCVBUF|OTHERSOCKBUF|DGRAMRCVBUF|NUMOTHERSOCK|DCACHESIZE|NUMFILE|AVNUMPROC|NUMIPTENT|ORIGIN_SAMPLE|SWAPPAGES)=' > $CFG < $CFG.pre-vswap vzctl set $CTID --ram $RAM --swap $SWAP --save vzctl set $CTID --reset_ub
== How to distinguish between vswap and non-vswap configs? ==