Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Nov 2022 16:36:25 +1100
From:      Ian Smith <smithi@nimnet.asn.au>
To:        mike tancsa <mike@sentex.net>,Kevin Oberman <rkoberman@gmail.com>
Cc:        questions@freebsd.org
Subject:   Re: RELENG_13 and min cpu frequency
Message-ID:  <E2DE24CB-5D07-41BC-9D62-708902305E0B@nimnet.asn.au>
In-Reply-To: <f5b51083-4bc4-2ee2-befd-b2356a781189@sentex.net>
References:  <9d17ea30-4b10-2aa3-9d09-017da7423844@sentex.net> <f5b51083-4bc4-2ee2-befd-b2356a781189@sentex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22 November 2022 6:08:02 am AEDT, mike tancsa <mike@sentex=2Enet> wrote:
 > On 11/18/2022 4:28 PM, mike tancsa wrote:
 > > I noticed that when I moved from an old RELENG11 to RELENG13
 > firewall,=20
 > > I was starting to get dropped packets=2E=C2=A0 Looking at when it was=
=20
 > > happening, it actually seems to happen at times where the network
 > load=20
 > > is really low?!?!=C2=A0 When I see a high PPS or high bandwidth, I do=
nt
 > get=20
 > > overruns on the nic=2E=C2=A0 Trying to figure out whats going on, it =
seems
 > to=20
 > > correlate with when the CPU reduces its frequency to save on power=2E
 >=20
 > > When its in turbo mode, it scales up to 4300, but then in the quiet
 >=20
 > > hours, it goes down to 800 and that seems to be when I start
 > getting=20
 > > the odd overrun=2E


 > OK, some possible progress=2E I noticed that
 >=20
 >  =C2=A0sysctl -a dev=2Ecpufreq=2E0=2Efreq_driver
 > dev=2Ecpufreq=2E0=2Efreq_driver: hwpstate_intel0
 >=20
 > Looking at the man page
 >=20
 > dev=2Ehwpstate_intel=2E%d=2Eepp
 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 Energy/Performance Preference=2E=C2=A0 Valid values range from
 > 0 to 100=2E
 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 Setting this field conveys a hint to the hardware
 > regarding a
 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 preference towards performance (at value 0), energy
 > efficiency
 >  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 (at value 100), or somewhere in between=2E
 >=20
 > it defaults to 50=2E=C2=A0 I changed the value to 5
 >=20
 > sysctl -w dev=2Ehwpstate_intel=2E0=2Eepp=3D5
 >=20
 >=20
 > Looking at the freq value
 >=20
 > dev=2Ecpu=2E0=2Efreq: 4410
 > dev=2Ecpu=2E0=2Efreq: 4410
 > dev=2Ecpu=2E0=2Efreq: 4410
 > dev=2Ecpu=2E0=2Efreq: 4410
 > dev=2Ecpu=2E0=2Efreq: 4410
 > dev=2Ecpu=2E0=2Efreq: 4410
 > dev=2Ecpu=2E0=2Efreq: 4410
 > dev=2Ecpu=2E0=2Efreq: 4410
 > dev=2Ecpu=2E0=2Efreq: 4410
 > dev=2Ecpu=2E0=2Efreq: 4410
 >=20
 >=20
 > Should have a better sense in a couple of days
 >=20
 >  =C2=A0=C2=A0=C2=A0 ---Mike

Ah, well=2E  hwpstate_intel was new in 13, I had to read the man online=2E

I guess you'll try various values from 0 to 100?

Maybe this indicates where powerd or successors might move?

I noticed also that you can turn it off at boot to perhaps re-engage est(4=
), or choose between the default package-level or per-cpu control, so  ther=
e's lots of scope for fine-tuning (or disastrous mismanagement :)

You might find sysutils/stress helpful with tests; loading up N cpus and/o=
r io and/or memory malloc/free, for specified lengths of time=2E

It might be useful to record, say, cpu=2E0=2Etemperature with frequencies?=
 And maybe vm=2Eloadavg, if it's behaving itself these days =2E=2E=2E

Ah, I really haven't the spare time to be this interested :)

cheers, Ian

 > > CPU is CPU: Intel(R) Xeon(R) E-2226G CPU @ 3=2E40GHz (3400=2E00-MHz=
=20
 > > K8-class CPU)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E2DE24CB-5D07-41BC-9D62-708902305E0B>