Skip to content

Add more resource plotting to the reports - #357

Open
harriscr wants to merge 3 commits into
ceph:mainfrom
harriscr:ch_wip_top_plotting
Open

Add more resource plotting to the reports#357
harriscr wants to merge 3 commits into
ceph:mainfrom
harriscr:ch_wip_top_plotting

Conversation

@harriscr

@harriscr harriscr commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The post processing modules in CBT can produce a plot with CPU usage during a run. Currently only the CPU usage as reported by the FIO process can be plotted.

CBT supports additional tools for collecting resource usage statistics such as top, collectl and perf.

This PR adds support for resource usage as reported by the top and collectl tools.

As part of this work a minor refactor of the monitoring classes was done to bring them up to modern python coding standards. Additionally the top monitoring relied on an OSD pid file being present, which is a very specific use case.
This is still supported, but as a sub-class of a more generic top monitoring.

IBM Bob 2.0 and 2.0.1 was used to assist with this code

Testing
This was tested by:
Creating a report containing top and collectl CPU usage performance_report_260724_125457.pdf
A regression test for creating a report without and CPU uasage statistics.

Chris Harris added 3 commits July 23, 2026 15:51
When generating a report CBT can pull CPU and memory usage from the fio output files. This is not very useful, however as it only reports the resource usage for the fio process itself.
CBT also supports running other resource monitoring tools such as top and collectl.
This PR deals with specifically plotting CPU and memory usage for collectl.

The basic infrastructure already existed, so all that was needed was the pieces to parse the collectl output files and store the resource usage data in the intermediate format.

The code changes were:
 - a factory method to instantiate the correct resource_result class to process resouce usage data
 - the collectl resource_result class
 - updates to the run_result to use the factory method
 - plot multiple CPU lines
 - unit tests fpr the new code

Signed-off-by: Chris Harris <harriscr@uk.ibm.com>
Assisted-by: IBM Bob 1.03 and 2.0
Resource monitoring in CBT is contained within the monitoring class in CBT. This file contains multiple classes, one for each potential tool to use.
To make this easier to maintain in the future and to meet current Python coding guidelines this should be split up into once class per file.
These should have a common abstract base class which they all ingerit from, and a factory method to make sure the expected monitoring classes are run

Signed-off-by: Chris Harris <harriscr@uk.ibm.com>
Assisted-by: IBM Bob 2.0
Add plotting of top and collectl resource monitoring to CBT.
This required a slight re-factoring of both top and perf monitoring as they were specifically targetted twards OSDs, requiring an OSD PID file and only monitoring OSD PIDs, no matter what arguments were passed.
There is now a generic TopMonitoring and PerfMonitoring class, which will run the arguments passed in the YAML, an an Osd*Monitoring class that will require the OSD PID file as the current behaviour.

Signed-off-by: Chris Harris: <harriscr@uk.ibm.com>
Assisted-by: IBM Bob v 2.0 and 2.0.1
@harriscr
harriscr requested a review from lee-j-sanders July 24, 2026 14:53
@harriscr harriscr self-assigned this Jul 24, 2026
@harriscr
harriscr marked this pull request as ready for review July 24, 2026 14:54
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.

1 participant