Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional metrics for hyperthreaded cores in CpuUsage plugin #248

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mzhou0
Copy link
Contributor

@mzhou0 mzhou0 commented Aug 3, 2021

The CpuUsage plugin now generates additional metrics when hyperthreading is on. Hyperthreading is indicated by providing the ratio of virtual/physical cores in a config file.

This change allows the virtual-to-physical ratio of a hyperthreaded core to be specified in a config file.
@mzhou0 mzhou0 changed the title Modify CpuUsage plugin to generate additional metrics for hyperthreaded cores Add additional metrics for hyperthreaded cores in CpuUsage plugin Aug 3, 2021
@@ -47,6 +49,10 @@ def __init__(self, preprocessors, analytics, job, config, fail_fast=False):
self.start = time.time()
self.archives_processed = 0
self.fail_fast = fail_fast
if resconfig is not None and 'hyperthreaded_ratio' in config._config['resources'][resconfig['name']]:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if resconfig is not None and 'hyperthreaded_ratio' in config._config['resources'][resconfig['name']]:
if resconfig is not None and 'hyperthreaded_ratio' in resconfig:

@@ -47,6 +49,10 @@ def __init__(self, preprocessors, analytics, job, config, fail_fast=False):
self.start = time.time()
self.archives_processed = 0
self.fail_fast = fail_fast
if resconfig is not None and 'hyperthreaded_ratio' in config._config['resources'][resconfig['name']]:
self.hyperthreadedratio = config._config['resources'][resconfig['name']]['hyperthreaded_ratio']
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
self.hyperthreadedratio = config._config['resources'][resconfig['name']]['hyperthreaded_ratio']
self.hyperthreadedratio = resconfig['hyperthreaded_ratio']

A resource config is passed as an additional argument to the Summarize class. This can make it easier to directly access a config value for the resource being used.
@mzhou0 mzhou0 marked this pull request as ready for review August 6, 2021 14:29
@jpwhite4 jpwhite4 added this to the 1.5.0 milestone Jan 7, 2022
@jpwhite4 jpwhite4 requested a review from connersaeli May 18, 2023 17:22
@jpwhite4 jpwhite4 modified the milestones: 1.5.0, 1.4.2 May 18, 2023
@connersaeli connersaeli self-assigned this Aug 5, 2023
@connersaeli
Copy link
Contributor

connersaeli commented Aug 5, 2023

This needs corresponding changes to supremm_update.py in configure_resource(display, resource_id, resource, defaults) to support new hyperthreaded_ratio configuration. There still needs to be an option to set it even if it's optional.

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.

3 participants