Skip to content

Conversation

@askervin
Copy link
Collaborator

Composite balloons are balloons that get their CPUs by a union of the CPUs of their component balloons. Composite balloons are created from balloon types that have one or more components (balloon types).

Until now, when a new composite balloon is created, new balloon of each component type has been created, too. This enabled creating balloons that constist of an equal number of CPUs from every NUMA node. However if a system has two or more sockets, one may want to allocate an equal number of CPUs from every NUMA node from socket 0 for one container, and from socket 1 to another container, but without enforcing either of the sockets in the balloons annotation. Or more general, one may want to balance of similar containers across multiple balloon types. The purpose of this PR is to enable this kind of balancing.

When a new balloon of a composite balloon type is created, componentCreation specifies a strategy for choosing which components of the composite balloon that will be created and thus used for allocating CPUs for it. The default behavior is not changed: if componentCreation is unspecified or set to "all", one balloon from every composite type gets instantiated, and an equal number of CPUs is allocated through each component.

One new component creation strategy is introduced: "first-min-balloons". It will use only one of the components for CPU allocation: the first component whose balloon type that has the minimum number of balloon instances alive.

@askervin askervin force-pushed the 5f5-balloons-component-alloc branch from 4c3b72a to b6c10d6 Compare January 13, 2026 07:44
Copy link
Collaborator

@kad kad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, just few small questions.

@askervin askervin force-pushed the 5f5-balloons-component-alloc branch from b6c10d6 to 1fd5f3a Compare January 14, 2026 12:19
When a new balloon of a composite balloon type is created,
componentCreation specifies a strategy for choosing which components
of the composite balloon that will be used for allocating CPUs for
it. The default behavior is not changed: if componentCreation is
unspecified or set to "all", one balloon from every composite type is
instantiated, and allocate an equal number of CPUs is allocated
through each of them for the composite balloon.

A new component creation strategy is introduced: "balance-balloons"
will use only one component for CPU allocation: the first component
whose balloon type that has the minimum number of balloon instances.

This enables balancing containers into different balloon types, for
instance, half of the containers will be close to one device while the
other half another device in the system. This is achieved by defining
two normal balloon types, each close to one device, and a composite
balloon type with these normal balloon types as components, using
"balance-balloons" as componentCreation strategy, and preferring
creation of a new composite balloon for every container.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
@askervin askervin force-pushed the 5f5-balloons-component-alloc branch 2 times, most recently from 590a0f6 to 9dd58f2 Compare January 19, 2026 08:11
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
@askervin askervin force-pushed the 5f5-balloons-component-alloc branch from 9dd58f2 to fb90006 Compare January 19, 2026 08:25
@askervin askervin requested a review from kad January 19, 2026 08:48
Copy link
Collaborator

@kad kad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@klihub klihub merged commit 8c1dd7d into containers:main Jan 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants