Query: ProxVE (1.9) memory parameters for OpenVZ VMs via Web GUI

fortechitsolutions

Renowned Member
Jun 4, 2008
447
51
93
Hi, I'm curious if anyone can clarify how ram allocation for OpenVZ VMs in ProxmoxVE (1.9 is what I'm using still; not sure if it is different in v2.0beta product?), ie,

- via ProxmoxVE Web GUI for an OpenVZ VM you can set 2 parameters, "Memory (MB)" and "Swap (MB)"
- I note within an OpenVZ VM that when I run an app like "top" the "total memory" available is always the sum of the two parameters above ("memory" plus "swap") ; and that 'swap' in 'top' is listed as '0kb' (/proc/meminfo has a similar view of the situation)
- within the vz.conf for a OpenVZ VM (for example: a config file, /etc/vz/conf/VEID.conf ) we typically might have the following parameters associated with "RAM":

Code:
# Primary parameters
...
VMGUARPAGES="524288:9223372036854775807"


# Secondary parameters
KMEMSIZE="9223372036854775807:9223372036854775807"
OOMGUARPAGES="524288:9223372036854775807"
PRIVVMPAGES="524288:536788"

I'm just curious; how do the fields available in the web-GUI ( 'swap' vs 'memory' ) differ / since they seem to be 'aggregated' - or is there some 'calculation' running under-the-hood of ProxVE that allocates "memory parameters" to the ~4 different parameters in the VEID.Conf file 'differently' depending on allocations to "swap" vs "memory" in the mgmt gui ?

(extreme case example: 4gb ram in "memory" and 0mb swap config -- vs 0gb ram in 'memory' and 4gb in swap - config)

I'm also curious, if we then tinker under the hood - ie - adjust OpenVZ parameters directly, for example PRIVVMPAGES, for a given VEID, if this impacts what the ProxVE WebGUI displays in the 'swap' and 'memory' fields.


Any thoughts / comments are certainly greatly appreciated.

Tim
 
I'm just curious; how do the fields available in the web-GUI ( 'swap' vs 'memory' ) differ / since they seem to be 'aggregated' - or is there some 'calculation' running under-the-hood of ProxVE that allocates "memory parameters" to the ~4 different parameters in the VEID.Conf file 'differently' depending on allocations to "swap" vs "memory" in the mgmt gui ?

Older OpenVZ kernels did not support the notation of SWAP. So the PVE 1.9 GUI just aggregates RAM+SWAP (and set lockedpages to save RAW/SWAP relation). The calculation is done inside the 'pvectl' utility (please take a look at the sources).

There is better support for SWAP in PVE 2.0 (see http://wiki.openvz.org/VSwap)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!