Russian version
Add to
English version
Digg It!

 Old-School dkLab | Constructor | dklab_vzmem: visual noncontradictory memory distribution tool for OpenVZ 

Site map :: Project Orphus :: Constructor

Discuss at the Forum

You may help to develop and improve this library at GitHub

vzmem: visual noncontradictory memory distribution tool for OpenVZ
(C) dkLab,

Vzmem is a pseudo-graphical tool which allows you to distribute physical 
memory among all VEs consistently. It shows all physical memory blocks 
graphically in /etc/vz/conf/MEM-MAP  text file and lets you to move these 
blocks from one VE to another to redistribute the memory. Also you may 
specify "additional" memory personally for each VE: such memory will be 
obtained from system's free memory or swap (it is reflected as modifying 
of privvmpages parameter).


cd /usr/sbin wget chmod +x vzmem


1. Initialize a new /etc/vz/conf/MEM-MAP file based on your existed OpenVZ configs: vzmem -i 300 2. Edit this file with any text editor to re-distribute the memory available to containers: 300 10003 ========== 109552K 10004 ============================== 335503K 20004 ==========+++++++++++++++ 109552K + 221324K swap FREE ====================== 513525K You see, all the RAM is divided into 300 blocks, each block is displayed as "=" character. You may move these "=" characters among virtual machines to redistribute the memory (but you MUST keep the total number of "="'s equals to 300). You may also add "+" characters to specify that this block may be used not as a RAM-block only, but as SWAP too. 3. To apply changes you made in /etc/vz/conf/MEM-MAP, run: vzmem -a After you run this, vzmem will also recalculate memory kilobytes displayed at the right side of each bar.

Dmitry Koterov, Dk lab. ©1999-2020
Add to   Digg It!   Reddit