Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 2024 10:38:14 +0200 (CEST)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Bob Bishop <rb@gid.co.uk>, "current@freebsd.org" <current@FreeBSD.org>
Subject:   Re: powerd forgets top CPU frequency ?
Message-ID:  <1273956903.13647.1724575094919@localhost>
In-Reply-To: <202408250829.47P8TawP031885@critter.freebsd.dk>
References:  <202408241706.47OH6LfG023651@critter.freebsd.dk> <AEEBC43B-71F5-4974-87CB-3B05F096B07A@gid.co.uk> <202408250513.47P5DDZF029200@critter.freebsd.dk> <1264471055.10452.1724573369940@localhost> <202408250829.47P8TawP031885@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_13646_67042762.1724575094907
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Van: Poul-Henning Kamp <phk@phk.freebsd.dk>
Datum: zondag, 25 augustus 2024 10:29
Aan: Ronald Klop <ronald-lists@klop.ws>
CC: Bob Bishop <rb@gid.co.uk>, "current@freebsd.org" <current@FreeBSD.org>
Onderwerp: Re: powerd forgets top CPU frequency ?
> 
> --------
> Ronald Klop writes:
> 
> > A bit weird to try to give suggestions knowing how experienced you are in FreeBSD. But here we go,
> 
> I'm not very experienced with how modern CPU's are modulated :-)
> 
> > 1. What does the sysctl about cpu frequencies say. Does that value decrease too?
> > On my machine it is this:
> > # sysctl dev.cpu  | grep freq
> > dev.cpu.0.freq_levels: 1500/-1 600/-1
> > dev.cpu.0.freq: 1500
> 
> Right now:
>     dev.cpu.7.freq_levels: 2803/-1
>     dev.cpu.7.freq: 3103
>     dev.cpu.5.freq_levels: 2803/-1
>     dev.cpu.5.freq: 3103
>     dev.cpu.3.freq_levels: 2803/-1
>     dev.cpu.3.freq: 3103
>     dev.cpu.1.freq_levels: 2803/-1
>     dev.cpu.1.freq: 3103
>     dev.cpu.6.freq_levels: 2803/-1
>     dev.cpu.6.freq: 3103
>     dev.cpu.4.freq_levels: 2803/-1
>     dev.cpu.4.freq: 3103
>     dev.cpu.2.freq_levels: 2803/-1
>     dev.cpu.2.freq: 3103
>     dev.cpu.0.freq_levels: 2803/-1
>     dev.cpu.0.freq: 3103
> 
> > 2. Does https://www.freshports.org/sysutils/powerdxx/ exhibit the same issue? To rule out if it is in the binary or in the kernel.
> 
> Will try.
> 
> > 3. out-of-the-box: are your CPUs similar? So, do both have the same top frequency?
> 
> Yes, it's a: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
> 
> > 4. And powerd(8) mentions a -v option: "Verbose mode.  Messages about power changes will be printed to stdout and powerd will operate in the foreground."
> > Does that print anything useful?
> 
> Yes, that's where I noticed the "gradually run slower and slower"...
> 
> Initially I thought it was some kind of thermal throttling, but leaving the computer
> idle overnight did not lead to automatic recovery, whereas reboots and as far as I
> can tell, restarting powerd does.
> 
> -- 
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk@FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe    
> Never attribute to malice what can adequately be explained by incompetence.
> 
> 
> 


    dev.cpu.7.freq_levels: 2803/-1
    dev.cpu.7.freq: 3103


This is interesting by itself. According to the sysctl the CPU only has 1 frequency to select, which is 2803, but it is running on 3103. Maybe there is some other mechanism which influences the CPU freq on your machine. I hope somebody else can shine some light on this.
Doesn't the output (or source) of powerd give some insight on why it makes the decisions it makes?

Regards,
Ronald.
 
------=_Part_13646_67042762.1724575094907
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head></head><body><br>
<p><strong>Van:</strong> Poul-Henning Kamp &lt;phk@phk.freebsd.dk&gt;<br>
<strong>Datum:</strong> zondag, 25 augustus 2024 10:29<br>
<strong>Aan:</strong> Ronald Klop &lt;ronald-lists@klop.ws&gt;<br>
<strong>CC:</strong> Bob Bishop &lt;rb@gid.co.uk&gt;, "current@freebsd.org" &lt;current@FreeBSD.org&gt;<br>
<strong>Onderwerp:</strong> Re: powerd forgets top CPU frequency ?</p>

<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
<div class="MessageRFC822Viewer" id="P">
<div class="TextPlainViewer" id="P.P">--------<br>
Ronald Klop writes:<br>
<br>
&gt; A bit weird to try to give suggestions knowing how experienced you are in FreeBSD. But here we go,<br>
<br>
I'm not very experienced with how modern CPU's are modulated :-)<br>
<br>
&gt; 1. What does the sysctl about cpu frequencies say. Does that value decrease too?<br>
&gt; On my machine it is this:<br>
&gt; # sysctl dev.cpu &nbsp;| grep freq<br>
&gt; dev.cpu.0.freq_levels: 1500/-1 600/-1<br>
&gt; dev.cpu.0.freq: 1500<br>
<br>
Right now:<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.7.freq_levels: 2803/-1<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.7.freq: 3103<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.5.freq_levels: 2803/-1<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.5.freq: 3103<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.3.freq_levels: 2803/-1<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.3.freq: 3103<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.1.freq_levels: 2803/-1<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.1.freq: 3103<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.6.freq_levels: 2803/-1<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.6.freq: 3103<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.4.freq_levels: 2803/-1<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.4.freq: 3103<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.2.freq_levels: 2803/-1<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.2.freq: 3103<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.0.freq_levels: 2803/-1<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.0.freq: 3103<br>
<br>
&gt; 2. Does <a href="https://www.freshports.org/sysutils/powerdxx/">https://www.freshports.org/sysutils/powerdxx/</a>; exhibit the same issue? To rule out if it is in the binary or in the kernel.<br>
<br>
Will try.<br>
<br>
&gt; 3. out-of-the-box: are your CPUs similar? So, do both have the same top frequency?<br>
<br>
Yes, it's a: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz<br>
<br>
&gt; 4. And powerd(8) mentions a -v option: "Verbose mode. &nbsp;Messages about power changes will be printed to stdout and powerd will operate in the foreground."<br>
&gt; Does that print anything useful?<br>
<br>
Yes, that's where I noticed the "gradually run slower and slower"...<br>
<br>
Initially I thought it was some kind of thermal throttling, but leaving the computer<br>
idle overnight did not lead to automatic recovery, whereas reboots and as far as I<br>
can tell, restarting powerd does.<br>
<br>
--&nbsp;<br>
Poul-Henning Kamp &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| UNIX since Zilog Zeus 3.20<br>
phk@FreeBSD.ORG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| TCP/IP since RFC 956<br>
FreeBSD committer &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| BSD since 4.3-tahoe &nbsp;&nbsp;&nbsp;<br>
Never attribute to malice what can adequately be explained by incompetence.</div>

<hr></div>
</blockquote>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.7.freq_levels: 2803/-1<br>
&nbsp;&nbsp;&nbsp;&nbsp;dev.cpu.7.freq: 3103<br>
<br>
<br>
This is interesting by itself. According to the sysctl the CPU only has 1 frequency to select, which is 2803, but it is running on 3103. Maybe there is some other mechanism which influences the CPU freq on your machine. I hope somebody else can shine some light on this.<br>
Doesn't the output (or source) of powerd give some insight on why it makes the decisions it makes?<br>
<br>
Regards,<br>
Ronald.<br>
&nbsp;</body></html>
------=_Part_13646_67042762.1724575094907--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1273956903.13647.1724575094919>