Skip to content

How it works

Aicerine runs a loop: observe the hosts, plan moves, prove the plan in a simulator, apply it at the autonomy level you set. Prevention and correction share that loop.

StepInputOutput
ObserveMeasured usage per VM and per host (the host agent), Placement inventories, Nova's migration recordsA timestamped state of the cloud
PlanThat state, your policy, VM eligibility, learned migration costsAn ordered list of moves, each with its cost, gain and risk
ProveThe plan and the stateThe predicted state after the plan, or a refusal
ApplyAn approved planPlacement ratio updates and Nova live migrations, journaled, then checked

Prevention: the ratio per host

Placement admits a VM on a host while the allocated vCPUs stay under cores × allocation_ratio. Aicerine writes that ratio per host, from measured load:

  • it lowers the ratio of a hot host, so Placement stops sending it new VMs;
  • it gives the margin back when the host cools down;
  • it never goes above the target ratio you set for the aggregate, nor below a floor you set;
  • every write is journaled with the previous value, and one command restores the target ratio on every host.

This is admission, not ranking: coarser than a scheduler weigher, and enough once combined with correction.

The ratio only holds if cpu_allocation_ratio is absent from the nova.conf of your computes. If it is set, nova-compute rewrites the inventory periodically and overwrites Aicerine's value. See OpenStack.

Correction: planned live migrations

Which VMs can move

A VM is a candidate only if all of the following hold:

  • no PCI passthrough; SR-IOV, dedicated CPUs, NUMA topologies and huge pages only on flavors you have validated for live migration;
  • its disks are on shared storage;
  • the move breaks no affinity or anti-affinity rule of its server group;
  • it is ACTIVE, not locked, and has no task in progress;
  • you have not excluded it, its project or its tenant;
  • it has not moved recently.

A target host must be admitted by Placement after Aicerine's ratio, enabled, not in maintenance, and under Nova's max_concurrent_live_migrations.

What a move costs

cost = memory to copy × dirty-page rate + risk. The risk weighs the chance that the migration does not converge and the number of tenants touched. On shared storage there is no disk to copy, so memory dominates.

The dirty-page rate is learned from Nova's own migration records: every real migration teaches the cost of that VM for the next one. Before a VM's first migration, Aicerine assumes a pessimistic cost proportional to its memory.

That arithmetic is why Aicerine often moves the neighbours of a large VM: three small, quiet VMs cost less to move than one large, busy one.

The planner

The planner is deterministic: it searches the admissible moves under the cost model, and the same input always gives the same plan. Plans are testable and replayable. Each move carries its calculation line: source and target, measured load on both, predicted cost, predicted gain, and the alternative that was rejected and why.

No model takes part in that calculation. See The LLM.

After the move

Aicerine re-measures the source and the target once the migration has settled. A move whose measured gain is negative lowers the confidence of the cost model and keeps that VM still for longer.

Value is measured

Every plan is journaled with its predicted gain, then its measured gain. In observe, Aicerine records what it would have done, so a pilot compares it with what your cloud actually did, on criteria agreed beforehand.