Skip to content

add per-task CPU utilisation - #22

Closed
tmakatos wants to merge 2 commits into
mainfrom
per_task_cpu_util
Closed

tmakatos wants to merge 2 commits into
mainfrom
per_task_cpu_util

Conversation

@tmakatos

Copy link
Copy Markdown
Collaborator

This allows calculating average vs. median CPU utilisation, which helps
identifying load imbalances. This new piece of information is now
printed in the per-VM periodic message (when enabled). Specifically,
a new field is added in the 'cpu' field containing the median, before:

INFO ... cpu=average per-thread/total worker CPU percent

after:

INFO ... cpu=average per-thread/median/total worker CPU percent

Signed-off-by: Thanos Makatos thanos.makatos@nutanix.com


Stack created with GitHub Stacks CLI • Give Feedback 💬

@tmakatos
tmakatos added this pull request to stack #20 September 23, 2026 22:32
@tmakatos
tmakatos force-pushed the add_get_stats_dbus_method branch from 72f8aa9 to c13d047 Compare September 24, 2026 13:46
@tmakatos
tmakatos force-pushed the per_task_cpu_util branch 6 times, most recently from a965562 to 9def9e5 Compare September 24, 2026 14:08
@tmakatos
tmakatos force-pushed the add_get_stats_dbus_method branch from 876128d to af9b67c Compare September 24, 2026 14:11
@tmakatos
tmakatos force-pushed the per_task_cpu_util branch 2 times, most recently from 04c45fa to edb4d99 Compare September 24, 2026 14:19
Expose the read-only `GetStats() -> s` D-Bus method in debug and release
builds. It returns a JSON object containing the current tick and tracked
VMs with their thread count, vCPU bound, manual sticky state, automatic-
scaling eligibility, per-thread CPU utilisation, and cumulative I/O
counters.

Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
This allows calculating average vs. median CPU utilisation, which helps
identifying load imbalances. This new piece of information is now
printed in the per-VM periodic message (when enabled). Specifically,
a new field is added in the 'cpu' field containing the median, before:

	INFO ... cpu=average per-thread/total worker CPU percent

after:

	INFO ... cpu=average per-thread/median/total worker CPU percent

Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Base automatically changed from add_get_stats_dbus_method to main September 24, 2026 14:20
@tmakatos tmakatos closed this Sep 24, 2026
@tmakatos
tmakatos removed this pull request from stack #20 September 24, 2026 20:25
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.

2 participants