talos icon indicating copy to clipboard operation
talos copied to clipboard

Provide a way to set CPU scaling governor

Open rsmitty opened this issue 3 years ago • 5 comments

We'll be defaulting to schedutil soon instead of userspace, but some users want to set to performance. We should figure out how to make this value tweak-able. Sysctl sounds like the first place to look but I haven't found a good example of it, so we may have to find some other way to accomplish it.

rsmitty avatar Nov 09 '21 13:11 rsmitty

any update on this ?

abckey avatar Dec 16 '21 09:12 abckey

Hey @abckey, just to be clear about this issue, this will only solve being able to set the value explicitly in the machine config. Talos v0.14 already includes the schedutil default, which should see massive gains for you. But no movement on the configurability part yet. Stay tuned!

rsmitty avatar Dec 17 '21 14:12 rsmitty

CPU governor cannot be set by sysctl; rather, it is sysfs. We can/should add support for sysfs in a similar manner as we support sysctl.

Ulexus avatar Dec 17 '21 15:12 Ulexus

Depends on #4703

Ulexus avatar Dec 17 '21 16:12 Ulexus

As a FYI for documenting purposes, setting the scaling governor in sysfs is nice for testing. (instant) But quite awkward as it is needed to be set for all cores/threads (/cpu0/, /cpu1/ etc)

A more permanent elegant solution is to add a kernel parameter using:

machine:
  install:
    extraKernelArgs:
      - cpufreq.default_governor=performance

(in a existing cluster you need to run a talos upgrade in order for this to become effective)

nberlee avatar Sep 13 '22 16:09 nberlee

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 04 '24 01:07 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jul 10 '24 01:07 github-actions[bot]