On Friday, 14 June 2024 03:52:38 BST Walter Dnes wrote: > 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.
I would think 46-48°C is refreshingly cool, but it very much depends on the CPU chip, the MoBo and its BIOS/microcode settings. As a rule laptops have lower temperatures than desktops, before they start throttling. Laptop platforms also tend to limit the maximum frequency when all cores are running to keep the temperature under control. I recall an early i7 CPU laptop would not go above 2,400MHz when 4core/8threads were running, but on single core processes I would see it on i7z jumping up to 4,200MHz. Similarly, on modern CPUs the boost frequency on all cores is lower than when applied on a single core only. A 25% improvement on a kernel compilation time is rather significant and corresponds to your 30% increase in frequency minus thermal losses. What do you get when you run make with '-j jobs', where jobs=max threads of your CPU?
signature.asc
Description: This is a digitally signed message part.

