Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 2013 00:24:54 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Kevin Oberman <rkoberman@gmail.com>, freebsd-acpi@freebsd.org, ?????? <lisen1001@gmail.com>
Subject:   Re: Xeon E5 cpu work in low status
Message-ID:  <20131104222454.GU59496@kib.kiev.ua>
In-Reply-To: <201311041453.03864.jhb@freebsd.org>
References:  <CA%2BTSNq_9gGJrc3z_d-AJcqBKr164v5xYs5YRPJAeW_YED-Nb_w@mail.gmail.com> <CAN6yY1vyvmuN5UPzzoey4j1EEkgeKX0d62uL3MfhnPDdXCMB7g@mail.gmail.com> <201311041453.03864.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--3cvvRM8VcazWLkOB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Nov 04, 2013 at 02:53:03PM -0500, John Baldwin wrote:
> On Monday, November 04, 2013 12:52:53 pm Kevin Oberman wrote:
> > On Mon, Nov 4, 2013 at 12:46 AM, ?????? <lisen1001@gmail.com> wrote:
> >=20
> > > hi,all:
> > >         the cpu of my machine is :  Intel(R) Xeon(R) CPU E5-2643 0 @
> > > 3.30GHz.
> > >
> > >         after a reboot. The cpu freq is : sysctl dev.cpu.0.freq
> > > dev.cpu.0.freq: 1200
> > >
> > >         i didn't set any power savings config in rc.conf.
> > >
> > >         How can i fix this?
> > >
> >=20
> > It's not clear what is broken. Is the server busy? Is there some reason=
 to
> > expect it to be running at full clock-rate?
> >=20
> > What is the content of dev.cpu.0.freq_levels?
> >=20
> > By default, FreeBSD runs powerd and that will, by default, throttle back
> > the clock when the system is not busy. I think that this is a bad thing=
=2E,
> > but it is not a bug. It's by design. I really think, based on my own
> > testing, research and a major NSF computer center (SDSC), and work done=
 by
> > mav@ which can be found on the FreeBSD wiki (
> > https://wiki.freebsd.org/TuningPowerConsumption), those "power manageme=
nt"
> > tools are broken by design a they are actually there for thermal contro=
l,
> > not power management and are, at best, break-even, and in most cases are
> > actually a loser in both power savings and system performance. (There a=
re a
> > very few edge cases where they can be beneficial, but as a side effect =
for
> > very specific loads under fairly unusual circumstances.)
> >=20
> > To turn off these (mis)features, add the following to /boot/loader.conf:
> > # Disable CPU throttling
> > hint.p4tcc.0.disabled=3D1
> > hint.acpi_throttle.0.disabled=3D1
> >=20
> > <rant>
> > All real power management is through the use of EST and CPU sleep (CX)
> > states. These  can provide a big power win at minimal performance impac=
t.
> > Unfortunately CX states and throttling lay very badly together, probably
> > because processor designers don't think that TCC and throttling are for
> > power management, so are not an issue.
> >=20
> > For reasons that have always baffled me, rather than disable the
> > inappropriate use of thermal management as power management, we disable=
 the
> > most effective power management tools by default.
> > performance_cx_lowest=3D"HIGH" # Online CPU idle state
> > economy_cx_lowest=3D"HIGH" # Offline CPU idle state
> >=20
> > Even the comments are confusing: what do "Online" and "Offline" mean?
> > Offline means running on battery and online means AC power.
> >=20
> > In any case, it's not clear that there is any issue with your system ot=
her
> > than that, by default, FreeBSD tries to really, really hard to manage p=
ower
> > as badly as humanly possible.
> > </rant>
>=20
> The only thing is that powerd is not enabled by default, so it shouldn't =
be
> set to 1200 out of the box.  I think there have been a few laptops=20
> historically that would startup at a lower clock speed (EST) when booted =
on
> battery, but I've never heard of that for servers.
>=20
> In terms of thermal throttling vs EST: ideally powerd would only ever use=
 EST,
> and the throttling would be driven by acpi_thermal.  Most systems don't h=
ave=20
> the _TC1/_TC2 methods acpi_thermal needs (I think I've only seen it on ol=
der=20
> laptops), so that would effectively disable TCC on modern systems.
>=20
> This requires tearing cpufreq apart a bit.  It's also not clear what we s=
hould
> display to the user.  The simplest approach would be to only export "abso=
lute"
> frequencies in freq_levels and the current "absolute" frequency as "freq".
> That would allow powerd to not need any changes.  You could use a differe=
nt
> sysctl node that is "throttling percent" or some such.  If throttling kic=
ked
> in on a system with TC1/TC2 then 'freq' wouldn't change when the CPU was=
=20
> throttled, only the "throttling percent".

My Intel board DQ67OW starts with the fixed CPU speed, which is
configurable in BIOS. Unless OS starts managing the frequency with the
cpufreq and powerd, CPU is locked to the pre-configured speed. It was
not easy to understand why my single-user memory b/w benchmarks show
half of the expected throughput for the cache, until I found the setting
and found that Intel defaults to 1/2 of the marketing frequency.

For my board, it is Performance->Processor Overrides->Maximum Non-Turbo
Ratio.  It was set to 17, normal CPU mode is 34, turbo is 38 max.

--3cvvRM8VcazWLkOB
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQIcBAEBAgAGBQJSeB61AAoJEJDCuSvBvK1BJPEP/1Q66rM3MALpPgBvf6/09t2u
RivLDccEcMAwbWp298bhrstj09svKC3/+47/idp2wwsk85R69rzIvQ+9CMNU56lC
9HUNuEl4qC6nsGprJJbbSRK/qh1R7u88XIgXbKiXsSGegJfRnPJNOZTKDdN+7VaZ
I7hUeuxtyXBI2jUWIlG9AzvNg8DXALHO15wkdMllSf+/5pBRHYDjCzMr8NOh144v
3iiV4A5ONWiGo3W3ReYz+q38UEqNcL5GpohPlfY+prQjVjjeagV5eclPJX6m2oW8
rpu63Jz0ETy6R4LVeKOav/8DeBHYxkgD24CTmuho1CvOYRWxU93a+ww7RnEmXiBf
Ht1FUT2kp933me7rixcWgv3tZVXZq9dPxzmhUwEpExIf2A0GmHwP1OljrfVmC/C9
CXfnRMNzogPEUpPPP+HYCvBOR35J+8CW1SZCwfTFtUCdPTlkGKynQ9EQzont13QL
TySrB7oVmQ3fA4lyindTSvRtzFfg72red0IP6Dh1uSD71FrdYu9hHKl4412pYgnQ
s5NsrRxfWyQGtz6mXQKoe6lRDwqlOStxNzyuvKys8qtEZvbUl3RS0sowMyVoMDiq
77+m3ySz01MuMqYcGhpYk0Ux7jQvTPtMEBZgyybwkFjytp8KFrZZPCvR82lfASXr
qT9uWQCNvi5CIbw1Gtfu
=ad6o
-----END PGP SIGNATURE-----

--3cvvRM8VcazWLkOB--



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