Skip to content

Pass immutable data to ScalingEngines - #109

Open
lforchini wants to merge 1 commit into
test/ctest-thresholdfrom
bugfix/stop-backend-util-report
Open

lforchini wants to merge 1 commit into
test/ctest-thresholdfrom
bugfix/stop-backend-util-report

Conversation

@lforchini

@lforchini lforchini commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #89, Fixes #90

The controller constructs a struct from tracking mutable state and
backend collected performance counters which it then passes to the
engine. Previously the engine was given a reference to the Instance
itself, potentially allowing the engine to bypass the controller. Now,
only the controller can command the Instance with the engine advising
the controller.

This split also makes testing easier. Instead of having to construct
full Instances, now only fake data needs to be passed to the engine to
evaluate its decisions.

Also, the controller now derives thread count and utilisation from
procfs instead of relying on the backend.

Signed-off-by: Leonardo Forchini leonardo.forchini@nutanix.com


Stack created with GitHub Stacks CLI • Give Feedback 💬

@lforchini
lforchini added this pull request to stack #95 October 15, 2026 11:20
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch 4 times, most recently from 798ca75 to dcb6572 Compare October 15, 2026 11:58
@lforchini
lforchini marked this pull request as ready for review October 15, 2026 11:59
@lforchini
lforchini removed this pull request from stack #95 October 21, 2026 08:27

@tmakatos tmakatos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

By "bypassing" do you mean trigger scale ups/downs?

@lforchini
lforchini added this pull request to stack #152 October 23, 2026 08:22
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from dcb6572 to 104c4cd Compare October 23, 2026 08:24
Fixes #89, #90

The controller constructs a struct from tracking mutable state and
backend collected performance counters which it then passes to the
engine. Previously the engine was given a reference to the Instance
itself, potentially allowing the engine to bypass the controller. Now,
only the controller can command the Instance with the engine advising
the controller.

This split also makes testing easier. Instead of having to construct
full Instances, now only fake data needs to be passed to the engine to
evaluate its decisions.

Also, the controller now derives thread count and utilisation from
procfs instead of relying on the backend.

Signed-off-by: Leonardo Forchini <leonardo.forchini@nutanix.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 104c4cd to 18af41d Compare October 23, 2026 08:40
@lforchini
lforchini removed this pull request from stack #152 October 23, 2026 08:44
@lforchini
lforchini added this pull request to stack #157 October 23, 2026 08:45
@lforchini
lforchini removed this pull request from stack #157 October 23, 2026 08:49
@lforchini
lforchini added this pull request to stack #159 October 23, 2026 08:50
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.

Backend reports its own worker thread utilisation Controller uses thread count from backend

2 participants