Skip to content

feat(split-finder): support splitting based on the resulting number of canisters - #12038

Open
pierugo-dfinity wants to merge 1 commit into
masterfrom
pierugo/subnet-splitting/split-on-canisters-installed
Open

pierugo-dfinity wants to merge 1 commit into
masterfrom
pierugo/subnet-splitting/split-on-canisters-installed

Conversation

@pierugo-dfinity

@pierugo-dfinity pierugo-dfinity commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Support splitting a subnet by optimizing according to the resulting number of canisters on each subnet.

To do so, we support canisters_installed as a new load type. In that case, we naturally label each canister as having a load of 1: the optimizer will then optimize in such a way that each resulting subnet has the same "load", i.e. the same "number of canisters".

Tested locally.

A following PR will also add support for optimizing according to the resulting state sizes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the change adding canister-count balancing.

No open issues 🎉

What changed in this PR

Adds canisters_installed as a load type so the subnet split finder can balance canister counts using its existing optimizer.

Changes:

  • Exposes the new load type among supported options.
  • Assigns each canister one unit of load, unaffected by baseline subtraction.
  • Adds tests for unit loads and an even 10/10 split of 20 canisters.
File Description
rs/​recovery/​subnet_splitting/​split_finder/​split_finder.py Registers the new supported load type.
rs/​recovery/​subnet_splitting/​split_finder/​split_finder_test.py Tests canister-count loading and balanced splitting.
rs/​recovery/​subnet_splitting/​split_finder/​data_io.py Defines canisters_installed and assigns unit loads.

Review effort: Balanced

@pierugo-dfinity
pierugo-dfinity marked this pull request as ready for review November 6, 2026 14:25
@pierugo-dfinity
pierugo-dfinity requested a review from a team as a code owner November 6, 2026 14:25
@pierugo-dfinity pierugo-dfinity changed the title feat(split-finder): support splitting on canisters installed feat(split-finder): support splitting based on the resulting number of canisters Nov 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants