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

Support cpupower #34

Open
psyhtest opened this issue Jan 17, 2024 · 2 comments
Open

Support cpupower #34

psyhtest opened this issue Jan 17, 2024 · 2 comments
Assignees

Comments

@psyhtest
Copy link
Contributor

If we install linux-tools-* on Ubuntu (including in Docker):

sudo apt install linux-tools-common linux-tools-generic 

we can easily switch between different governors e.g.:

  • for Peak Performance profiles:
sudo cpupower frequency-set --governor performance
  • for Energy Efficiency profiles:
sudo cpupower frequency-set --governor powersave

More options can be available like conservative and ondemand, but performance and powersave should be sufficient.

We would like to add these commands to axs, so that when governor=$GOVERNOR is specified, we automatically run:

sudo cpupower frequency-set --governor $GOVERNOR

before the experiment.

@psyhtest
Copy link
Contributor Author

Check current governor (powersave)

cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 1000 MHz - 4.00 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 1000 MHz and 4.00 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 1.11 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

Set new governor (performance)

sudo cpupower frequency-set --governor performance
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
Setting cpu: 8
Setting cpu: 9
Setting cpu: 10
Setting cpu: 11
Setting cpu: 12
Setting cpu: 13
Setting cpu: 14
Setting cpu: 15
Setting cpu: 16
Setting cpu: 17
Setting cpu: 18
Setting cpu: 19
Setting cpu: 20
Setting cpu: 21
Setting cpu: 22
Setting cpu: 23
Setting cpu: 24
Setting cpu: 25
Setting cpu: 26
Setting cpu: 27
Setting cpu: 28
Setting cpu: 29
Setting cpu: 30
Setting cpu: 31
Setting cpu: 32
Setting cpu: 33
Setting cpu: 34
Setting cpu: 35
Setting cpu: 36
Setting cpu: 37
Setting cpu: 38
Setting cpu: 39
Setting cpu: 40
Setting cpu: 41
Setting cpu: 42
Setting cpu: 43
Setting cpu: 44
Setting cpu: 45
Setting cpu: 46
Setting cpu: 47

Check current governor (performance)

cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 1000 MHz - 4.00 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 1000 MHz and 4.00 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 2.85 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

@ens-lg4
Copy link
Collaborator

ens-lg4 commented Jan 24, 2024

Currently works by adding ,desired_governor=performance or ,desired_governor=powersave (or any other value supported by cpupower ). The value is first set, then independently read (as a form of feedback), and this read value gets recorded in the experiment.

We don't yet have the desired governor linked with specific SUTs, scenarios, etc.

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

No branches or pull requests

2 participants