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":
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
- 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