Skip to content

Derive thread count and utilisation from procfs - #109

Draft
lforchini wants to merge 3 commits into
test/ctest-thresholdfrom
bugfix/stop-backend-util-report
Draft

lforchini wants to merge 3 commits 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 now derives thread count and utilisation from procfs
instead of relying on the backend. Backends no longer report a thread
count or a per-thread utilisation in their ThreadPoolSnapshot; instead,
the controller always samples the backend process's tasks through
/proc using the instance's thread-name filter.

This removes QEMU's own jiffies sampler and the rolling metrics path
for backend-computed utilisation. The fake backend gets a deterministic
PID, and the component test harness publishes matching task stat files
through mockfs.


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 test/ctest-threshold branch from 8228b1f to 24ddf12 Compare October 23, 2026 08:24
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from dcb6572 to 104c4cd Compare October 23, 2026 08:24
@lforchini
lforchini force-pushed the test/ctest-threshold branch from 24ddf12 to 7e23df1 Compare October 23, 2026 08:40
@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
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 18af41d to cddaca3 Compare October 29, 2026 14:29
@lforchini
lforchini force-pushed the test/ctest-threshold branch from 7e23df1 to d786eff Compare October 29, 2026 14:29
@lforchini
lforchini marked this pull request as draft October 30, 2026 10:19
@lforchini
lforchini removed this pull request from stack #159 October 30, 2026 10:48
@lforchini
lforchini force-pushed the test/ctest-threshold branch from d786eff to b637fd4 Compare October 30, 2026 10:49
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from cddaca3 to 7b9233a Compare October 30, 2026 10:49
@lforchini
lforchini added this pull request to stack #173 October 30, 2026 10:50
@lforchini
lforchini force-pushed the test/ctest-threshold branch from b637fd4 to 7ae17af Compare October 30, 2026 10:55
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch 2 times, most recently from afcdf27 to 6a98116 Compare October 30, 2026 11:22
@lforchini
lforchini force-pushed the test/ctest-threshold branch from 7ae17af to 82b10af Compare October 30, 2026 11:22
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from ef6d09e to 735c813 Compare November 5, 2026 15:03
@lforchini
lforchini force-pushed the test/ctest-threshold branch from 77ea0a5 to 084cfae Compare November 5, 2026 15:03
@lforchini
lforchini added this pull request to stack #176 November 5, 2026 15:03
@lforchini lforchini changed the title Pass immutable data to ScalingEngines Derive thread count and utilisation from procfs Nov 5, 2026
@lforchini
lforchini removed this pull request from stack #176 November 5, 2026 15:09
@lforchini
lforchini force-pushed the test/ctest-threshold branch from 084cfae to 84c98cb Compare November 5, 2026 15:10
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 735c813 to 7e40811 Compare November 5, 2026 15:10
@lforchini
lforchini marked this pull request as ready for review November 5, 2026 15:10
@lforchini
lforchini added this pull request to stack #178 November 5, 2026 15:10
@lforchini
lforchini marked this pull request as draft November 6, 2026 09:05
@lforchini
lforchini removed this pull request from stack #178 November 6, 2026 10:23
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 7e40811 to f7e474c Compare November 6, 2026 10:24
@lforchini
lforchini added this pull request to stack #180 November 6, 2026 10:24
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch 12 times, most recently from e224d62 to 1cde4a8 Compare November 16, 2026 10:38
Fixes #89
Fixes #90

The controller now derives thread count and utilisation from procfs
instead of relying on the backend. Backends no longer report a thread
count or a per-thread utilisation in their ThreadPoolSnapshot; instead,
the controller always samples the backend process's tasks through
/proc using the instance's thread-name filter.

This removes QEMU's own jiffies sampler and the rolling metrics path
for backend-computed utilisation. The fake backend gets a deterministic
PID, and the component test harness publishes matching task stat files
through mockfs.

AI-Generated: most of it
Signed-off-by: Leonardo Forchini <leonardo.forchini@nutanix.com>
Python type annotations for conftest, harness and component tests.
No functional changes.

AI-Generated: type hints only
@lforchini
lforchini force-pushed the bugfix/stop-backend-util-report branch from 1cde4a8 to bb9b874 Compare November 16, 2026 10:46
@lforchini
lforchini removed this pull request from stack #180 November 16, 2026 14:48
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