Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2022 14:48:04 -0800
From:      Kevin Oberman <rkoberman@gmail.com>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        mike tancsa <mike@sentex.net>, questions@freebsd.org
Subject:   Re: RELENG_13 and min cpu frequency
Message-ID:  <CAN6yY1v59%2BUeHuOZBVeK%2BsN694u=xjA7CyXOiOMEXtkgZfYQFA@mail.gmail.com>
In-Reply-To: <BF5CF7F7-DBB3-45A5-9FFA-7595EF41D494@nimnet.asn.au>
References:  <9d17ea30-4b10-2aa3-9d09-017da7423844@sentex.net> <BF5CF7F7-DBB3-45A5-9FFA-7595EF41D494@nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000076b59c05edda9ecd
Content-Type: text/plain; charset="UTF-8"

On Fri, Nov 18, 2022 at 9:41 PM Ian Smith <smithi@nimnet.asn.au> wrote:

> On 19 November 2022 8:28:45 am AEDT, mike tancsa <mike@sentex.net> wrote:
>
> Hi mike,
>
>  > I noticed that when I moved from an old RELENG11 to RELENG13
>  > firewall, I
>  > was starting to get dropped packets.
>
> excuse savage pruning; phone ...
>
>  > e.g. printing it out every second, I see
>  >
>  > while true
>  > do
>  > /sbin/sysctl -n dev.cpu.0.freq
>  > sleep 1
>  > done
>  >
>  > 4308
>  > 4308
>  > 4308
>  > 4308
>  > 1902
>  > 900
>  > 900
>  > 900
>  > 4308
>  > 4308
>  > 4308
>  > 4308
>  > 4308
>  >
>  >    Whats the best way to set the box NOT to scale down the CPU below
>  > a
>  > certain frequency ? I want to see if not letting it drop below 3000
>  > prevents packet overruns when there is a burst of traffic from a time
>  > of
>  > things being quiet ?
>  >
>  > Setting debug.cpufreq.lowest: to 3000 does not seem to make a
>  > difference
>
> I see below that it's 0 .. didn't it take, or was that another time?
>
>  > dev.cpu.0.freq_levels: 3400/-1
>  > dev.cpu.0.freq: 1302
>
> So, hmm.  powerd reads and sets values in dev.cpu.0.freq_levels, hence
> can't change it to anything but 3400.
>
> So how is cpu.0.freq changing at all?  Is cpufreq using est(4)?  Are there
> more freqs in dev.est.0.freq_settings?
>
> Or is it using a _relative_ driver like acpi_throttle or p4tcc?  Default
> /boot/device.hints has both of these disabled for good reason (Kevin
> Oberman can elaborate)
>
>  > sysctl -A debug.cpufreq
>  > debug.cpufreq.verbose: 0
>  > debug.cpufreq.lowest: 0
>  >
>  >
>  > CPU is CPU: Intel(R) Xeon(R) E-2226G CPU @ 3.40GHz
>  > (3400.00-MHz K8-class CPU)
>
> Also noted that the usual +1 freq for turbo mode isn't there.  Strange?
> (I don't speak Xeon though)
>
> cheers, Ian
>

In recent processors, things have changed radically WRT CPU frequency and
thermal behavior.

I have an Alder Lake system (12th gen) and a Comet Lake (10th gen). Both
now show a single frequency. On my Alder Lake I see:
dev.cpu.?.freq_levels: 2496/-1
This is shown for all CPU devices (threads) whether P or E cores. Thermal
control does change these seeds continually. I have seen E cores at 900M,
but rarely. I see them as 1.2G during buildworld. The P cores are at 1.3G.
I have never seen ANY core running at over 2.5G. When I ordered my T16, the
specs showed minimum, default, and maximum frequencies, but I can't find
them any longer. All I can find are "Minimum" and "Max Turbo". It's not
clear to me what the significance of this is, but it was clearly a decision
of Intel. To me, it implies that Turbo is really no longer distinct , but
considered a portion of a continuum of frequencies.

Just looked again. buildworld is still running, and see all CPUs are at
2094, 2095, 2096, and 2097.   A few seconds later, 1997 to 2094. All CPUs
are not always running at very similar speeds. This is very different from
anything I have seen on older processors. I see no distinction between P
and E cores. I also suspect that powerd is no longer relevant for modern
CPUs.  Anyone have a pointer to information on CPU frequency and thermal
management on newer Intel processors?
-- 
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

--00000000000076b59c05edda9ecd
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:tahoma,sans-serif;font-size:small"><br></div></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 18, 2022=
 at 9:41 PM Ian Smith &lt;<a href=3D"mailto:smithi@nimnet.asn.au">smithi@ni=
mnet.asn.au</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">On 19 November 2022 8:28:45 am AEDT, mike tancsa &lt;<a href=3D"=
mailto:mike@sentex.net" target=3D"_blank">mike@sentex.net</a>&gt; wrote:<br=
>
<br>
Hi mike,<br>
<br>
=C2=A0&gt; I noticed that when I moved from an old RELENG11 to RELENG13<br>
=C2=A0&gt; firewall, I <br>
=C2=A0&gt; was starting to get dropped packets.<br>
<br>
excuse savage pruning; phone ...<br>
<br>
=C2=A0&gt; e.g. printing it out every second, I see<br>
=C2=A0&gt; <br>
=C2=A0&gt; while true<br>
=C2=A0&gt; do<br>
=C2=A0&gt; /sbin/sysctl -n dev.cpu.0.freq<br>
=C2=A0&gt; sleep 1<br>
=C2=A0&gt; done<br>
=C2=A0&gt; <br>
=C2=A0&gt; 4308<br>
=C2=A0&gt; 4308<br>
=C2=A0&gt; 4308<br>
=C2=A0&gt; 4308<br>
=C2=A0&gt; 1902<br>
=C2=A0&gt; 900<br>
=C2=A0&gt; 900<br>
=C2=A0&gt; 900<br>
=C2=A0&gt; 4308<br>
=C2=A0&gt; 4308<br>
=C2=A0&gt; 4308<br>
=C2=A0&gt; 4308<br>
=C2=A0&gt; 4308<br>
=C2=A0&gt; <br>
=C2=A0&gt; =C2=A0=C2=A0 Whats the best way to set the box NOT to scale down=
 the CPU below<br>
=C2=A0&gt; a <br>
=C2=A0&gt; certain frequency ? I want to see if not letting it drop below 3=
000 <br>
=C2=A0&gt; prevents packet overruns when there is a burst of traffic from a=
 time<br>
=C2=A0&gt; of <br>
=C2=A0&gt; things being quiet ?<br>
=C2=A0&gt; <br>
=C2=A0&gt; Setting debug.cpufreq.lowest: to 3000 does not seem to make a<br=
>
=C2=A0&gt; difference<br>
<br>
I see below that it&#39;s 0 .. didn&#39;t it take, or was that another time=
?<br>
<br>
=C2=A0&gt; dev.cpu.0.freq_levels: 3400/-1<br>
=C2=A0&gt; dev.cpu.0.freq: 1302<br>
<br>
So, hmm.=C2=A0 powerd reads and sets values in dev.cpu.0.freq_levels, hence=
 can&#39;t change it to anything but 3400.<br>
<br>
So how is cpu.0.freq changing at all?=C2=A0 Is cpufreq using est(4)?=C2=A0 =
Are there more freqs in dev.est.0.freq_settings?<br>
<br>
Or is it using a _relative_ driver like acpi_throttle or p4tcc?=C2=A0 Defau=
lt /boot/device.hints has both of these disabled for good reason (Kevin Obe=
rman can elaborate)<br>
<br>
=C2=A0&gt; sysctl -A debug.cpufreq<br>
=C2=A0&gt; debug.cpufreq.verbose: 0<br>
=C2=A0&gt; debug.cpufreq.lowest: 0<br>
=C2=A0&gt; <br>
=C2=A0&gt; <br>
=C2=A0&gt; CPU is CPU: Intel(R) Xeon(R) E-2226G CPU @ 3.40GHz<br>
=C2=A0&gt; (3400.00-MHz K8-class CPU)<br>
<br>
Also noted that the usual +1 freq for turbo mode isn&#39;t there.=C2=A0 Str=
ange?=C2=A0 (I don&#39;t speak Xeon though)<br>
<br>
cheers, Ian<br></blockquote><div><br></div><div style=3D"font-family:tahoma=
,sans-serif;font-size:small" class=3D"gmail_default">In recent processors, =
things have changed radically WRT CPU frequency and thermal behavior.</div>=
<div style=3D"font-family:tahoma,sans-serif;font-size:small" class=3D"gmail=
_default"><br></div><div style=3D"font-family:tahoma,sans-serif;font-size:s=
mall" class=3D"gmail_default">I have an Alder Lake system (12th gen) and a =
Comet Lake (10th gen). Both now show a single frequency. On my Alder Lake I=
 see:</div><div style=3D"font-family:tahoma,sans-serif;font-size:small" cla=
ss=3D"gmail_default">dev.cpu.?.freq_levels: 2496/-1</div><div style=3D"font=
-family:tahoma,sans-serif;font-size:small" class=3D"gmail_default">This is =
shown for all CPU devices (threads) whether P or E cores. Thermal control d=
oes change these seeds continually. I have seen E cores at 900M, but rarely=
. I see them as 1.2G during buildworld. The P cores are at 1.3G. I have nev=
er seen ANY core running at over 2.5G. When I ordered my T16, the specs sho=
wed minimum, default, and maximum frequencies, but I can&#39;t find them an=
y longer. All I can find are &quot;Minimum&quot; and &quot;Max Turbo&quot;.=
 It&#39;s not clear to me what the significance of this is, but it was clea=
rly a decision of Intel. To me, it implies that Turbo is really no longer d=
istinct , but considered a portion of a continuum of frequencies.</div><div=
 style=3D"font-family:tahoma,sans-serif;font-size:small" class=3D"gmail_def=
ault"><br></div><div style=3D"font-family:tahoma,sans-serif;font-size:small=
" class=3D"gmail_default">Just looked again. buildworld is still running, a=
nd see all CPUs are at 2094, 2095, 2096, and 2097.=C2=A0=C2=A0 A few second=
s later, 1997 to 2094. All CPUs are not always running at very similar spee=
ds. This is very different from anything I have seen on older processors. I=
 see no distinction between P and E cores. I also suspect that powerd is no=
 longer relevant for modern CPUs.=C2=A0 Anyone have a pointer to informatio=
n on CPU frequency and thermal management on newer Intel processors?<br></d=
iv></div>-- <br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"=
><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr">Kevin Ob=
erman, Part time kid herder and retired Network Engineer<br>E-mail: <a href=
=3D"mailto:rkoberman@gmail.com" target=3D"_blank">rkoberman@gmail.com</a><b=
r></div><div>PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683</div=
></div></div></div></div></div></div></div></div>

--00000000000076b59c05edda9ecd--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1v59%2BUeHuOZBVeK%2BsN694u=xjA7CyXOiOMEXtkgZfYQFA>