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 <phk@phk.freebsd.dk><br> <strong>Datum:</strong> zondag, 25 augustus 2024 10:29<br> <strong>Aan:</strong> Ronald Klop <ronald-lists@klop.ws><br> <strong>CC:</strong> Bob Bishop <rb@gid.co.uk>, "current@freebsd.org" <current@FreeBSD.org><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> > 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> > 1. What does the sysctl about cpu frequencies say. Does that value decrease too?<br> > On my machine it is this:<br> > # sysctl dev.cpu | grep freq<br> > dev.cpu.0.freq_levels: 1500/-1 600/-1<br> > dev.cpu.0.freq: 1500<br> <br> Right now:<br> dev.cpu.7.freq_levels: 2803/-1<br> dev.cpu.7.freq: 3103<br> dev.cpu.5.freq_levels: 2803/-1<br> dev.cpu.5.freq: 3103<br> dev.cpu.3.freq_levels: 2803/-1<br> dev.cpu.3.freq: 3103<br> dev.cpu.1.freq_levels: 2803/-1<br> dev.cpu.1.freq: 3103<br> dev.cpu.6.freq_levels: 2803/-1<br> dev.cpu.6.freq: 3103<br> dev.cpu.4.freq_levels: 2803/-1<br> dev.cpu.4.freq: 3103<br> dev.cpu.2.freq_levels: 2803/-1<br> dev.cpu.2.freq: 3103<br> dev.cpu.0.freq_levels: 2803/-1<br> dev.cpu.0.freq: 3103<br> <br> > 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> > 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> > 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."<br> > 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> -- <br> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20<br> phk@FreeBSD.ORG | TCP/IP since RFC 956<br> FreeBSD committer | BSD since 4.3-tahoe <br> Never attribute to malice what can adequately be explained by incompetence.</div> <hr></div> </blockquote> <br> <br> dev.cpu.7.freq_levels: 2803/-1<br> 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> </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>