I've been doing a bunch of kernel-compiling recently and I've switched
between schedulers from compile to compile to compare.  See
https://www.kernel.org/doc/html/v6.6/admin-guide/pm/cpufreq.html for
background info.  All frequencies in khz.  On my machine...

* bios_limit == 2901000

* scaling_available_frequencies == 2901000 2900000 2700000 2600000 2400000 
2300000 2100000 2000000 1800000 1700000 1500000 1400000 1200000 1100000 900000 
800000

* scaling_available_governors == conservative ondemand userspace powersave 
performance schedutil
  NOTE: You must build the governors you want into the kernel
make menuconfig
Power management and ACPI options
CPU Frequency scaling
...and select the desired governors.

  *YOUR NUMBERS AND GOVERNORS WILL BE DIFFERENT*  When rebuilding
kernels, I wanted to do "apples-to-apples" comparisons so I would...

* make menuconfig (in /usr/src/linux)
* cp .config .. (*VERY IMPORTANT*)
* make mrproper (initialize stuff in /usr/src/linux to a sane state)
* cp ../.config . (restore .config which got wiped by "make mrproper")
* (build new kernel, "time blah blah blah")

  I've cobbled together a bash script that can list and set cpu
frequencies and governors.  Note that root or sudo permission is needed
to set anything, because the script is writing to the /sys/ filesystem.
I would hover the mouse pointer over the ICEWM toolbar CPU widget to get
CPU data.

* select governor "userspace" and speed 2900000
* computer "idling"; CPU speed approx 2.900 ghz and temp 28 C
* compiling kernel; CPU speed approx 2.900 ghz and temp 35-to-37 C
* kernel takes 20 minutes to build

* select governor "schedutil"
* computer "idling"; CPU speed approx 0.800 ghz and temp 28 C
* compiling kernel; CPU speed approx 4.200 ghz and temp 46-to-48 C
* kernel takes 15 minutes to build

  Is that a dangerously high CPU temperature?  Building the kernel 5
minutes faster is a minor improvement.

-- 
Roses are red
Roses are blue
Depending on their velocity
Relative to you

Reply via email to