Skip to main content

Resource accounting: quotas and node memory

Center counts resources by VM (virtual machine) configuration, not by actual load. Each node has a capacity — the memory it provides to VMs. When a VM is powered on, Center checks whether the node has enough memory, whether the reserve for node failures is taken, and whether the VDC (virtual data center) quotas are exceeded. Center does not limit node cores.

Node memory​

  • Capacity is the latest measurement of the node physical memory minus the ZFS ARC cache ceiling and minus the memory reserve for vStack OS, if one is recorded for the node. Center refreshes the measurement itself. While there is no measurement, the node capacity is 0, and VMs do not power on on it. The capacity is shown in the RAM (GB) column of the node list.
  • Allocated is the sum of memory by configuration of the VMs that are running, starting, stopping or being moved on the node, plus VMs being moved to the node by live migration. A VM with the Migration failed status also takes memory.
  • Not counted are powered-off, suspended and failed-to-start VMs.
  • A remotely running VM (Remotely on its page) takes memory of the node where it runs, not of the node of its pool.

When Center checks memory​

  1. VM start, restart, resume. Center takes the node where the VM will start and subtracts the allocated memory from its capacity. If the remainder is not enough for the VM memory, Center rejects the action with the "Cluster RAM has been depleted" error (code -440). When a running VM is restarted, its memory is already counted, so it is enough for the remainder to be greater than zero.
  2. Reserve for node failures. On the same actions and on pool resume, Center checks the cluster as a whole: the power-on must not take the memory needed to start the VMs of failed nodes. Otherwise — the Not enough RAM in the cluster outside the failover reserve refusal, also with code -440 — Memory reserve for node failures.
  3. Node selection. For a VM that can run on any node, Center selects the least loaded one: 70% by the share of allocated memory and 30% by the share of allocated cores, with a slight preference for the node of the VM pool. If DRS is on and has load data for all nodes, the DRS load is used instead of the allocated values — DRS. Nodes in maintenance mode are not selected.
  4. Migration. Before a live migration, Center checks whether the target node has enough memory.
  5. Auto-restart after a failure. Center goes through the nodes in selection order and takes the first one with enough memory. If there is none, the VM waits for the next attempt.

Center starts routers without checking node memory. The failover reserve is not checked by auto-restart, creation, migration and DRS moves. After such actions, a node or the cluster may be left without spare memory, and the next VMs will not start.

VM start refused despite free memory​

  • One node is checked, although the error says "Cluster": other nodes may have memory.
  • VM memory is counted in full by configuration, even if the guest uses less.
  • Part of the memory is in the failover reserve. The nodes may have free memory, but the power-on would take the memory needed in case of a node failure.
  • Capacity is less than physical memory: the ZFS ARC cache and the vStack OS reserve are subtracted from it. A node without a memory measurement has a capacity of 0.
  • The node capacity is already exceeded after a router start or an auto-restart.

What to do — Cluster RAM has been depleted.

VDC quotas​

  • CPU and RAM count the cores and memory of the running VMs of the VDC. Center checks them on start, restart and resume.
  • Storage counts the sizes of VM disks. Snapshots are not included in this quota: the VDC has a separate snapshot quota for them.
  • The sum of quotas is not compared with the cluster capacity: the total of assigned quotas can exceed the cluster capacity.

Details — Set VDC quotas.

What Center limits​

ResourceWhat Center does
Coresdoes not limit: you can assign more vCPUs than the node has cores. Cores affect only node selection
Memorydoes not overcommit: VM memory is subtracted from the node capacity one to one, and part of the cluster memory is kept in reserve for node failures
Pool spacethe provisioned size of disks can exceed the pool capacity: count the headroom by used space

What you see​

  • Node list (Provider Data Center → the cluster name → Server Nodes): CPU (Cores) and RAM (GB) — the node capacity for VMs.
  • Node page: the Resources consumption block — how much is allocated to VMs and how much is used.
  • Start at node window: nodes where the VM will not start, with the reason — for example, Not enough memory on node <node> or Failover reserve.
  • VDC page: the CPU, Memory and Storage charts against quotas.
  • Errors on start: "Cluster RAM has been depleted", Not enough RAM in the cluster outside the failover reserve, "vDC RAM quota depleted", "vDC CPU cores quota depleted".

What not to do​

  • Do not allocate excess memory to VMs: Center counts all of it, even if the guest does not use it.
  • Do not move VMs by live migration into the reserve memory: migration does not check the reserve, and after a node failure, its VMs cannot be started on other nodes.
  • Do not assign quotas expecting Center to prevent the cluster capacity from being exceeded: it checks quotas only within a VDC.

See also​