mlco2 / mlco2/codecarbon

Avoid monitoring power when not needed

Open
#913 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.9k
Forks
323
Avg merge
1d 12h
Merged PRs (30d)
12

Description

Currently the trackers create two processes every measure_power_secs, using the dispatchers: _scheduler and _scheduler_monitor_power. The chain of processes created by _scheduler_monitor_power seems only to be needed when there is a CPU hardware whose mode isn't "intel_rapl". If that is correct, I suggest that _scheduler_monitor_power only be created/started when needed.

I can propose a PR if you think it is a good idea.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the tracker dispatcher path around _scheduler and _scheduler_monitor_power, then inspect how the CPU hardware mode is determined. Done means the monitor-power process chain is avoided for intel_rapl while power monitoring remains unchanged for other CPU modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.