From nobody Sat Aug 12 07:52:26 2023 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RNCYk2c26z4m6mZ for ; Sat, 12 Aug 2023 07:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RNCYk2B9Zz4FJF; Sat, 12 Aug 2023 07:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691826746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xhm6QgazDZmSyRZ4+HScPbFsP9KFZvP7tbeLMM2Ioh8=; b=Kr8idedxdv4XD6XifUW7Iq+UxRALVuS5NUXLEqs0tfDbOUXw9f+b9uYBF49DnF/UUtH5Mv 9OC7yy7WGBKSXcfkODj3/bJYo2VCCAf4abRLtsSvzOHqY//7I/rUuh7dU6RxPytTsjzcBq zRPoe+rTu8PbARH2DAD0U5wanTsmqmx51ZnBrR0BEjUdILUG2VMY+FQ+xkoCkkO2denOzW 4e9K9hyH43t/p3SkcjrLicK44v4pxNp4+CvagN/55+E1yQbPn5Qo0Q9ptiyNtisUJJlUMg 1x3t4p3dUUS3nL21lY1uGOBFUw8aPqNuGw9zkZ3gw25Lh9cUmHLadU1aFd/qvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691826746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xhm6QgazDZmSyRZ4+HScPbFsP9KFZvP7tbeLMM2Ioh8=; b=ZmtwEimJYDApUpZQrKiFtXdjKFuupUsDH8EM/AAklmgyS2A5snv5nIcmG+oKIgxEZ2k/oI AFhuVky/RLvovwP0ho8atsdH8Ekkq3XiqBnXS03SrZtOhOJ4ro/wqcpnab23MkMeqmQOuR Rv1BFpDKlmEJqcU/1dq5L1j6ehEpq7d2HOfKE5D16rNC649V0d9ywX5Smjzl7N9rWWrA5h lWeGWqa0d6qr/9lkhzIqndsxnkiRBF3x4E9CxVM2RS9HmSbVHiwHty4Eenty0ETZ7NYCUc UCcmzXgyYxxbx7Unut+8mUDFDDohvNbTIdHV+jk9GuLGutkZ9hYb4o0lrmfTEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691826746; a=rsa-sha256; cv=none; b=QmzfLXoh/Q+SdXL8uPOVnXQTsZ+xJGsZpBKD809xOenbw9+gNbw3JCLFkRwUUUzYAJc8Ir bjq+z5gwAtFMinCFpdwy9WT6/PdoVZmDdCzlUqLpLPR3hijF+Zv3/Io1EyzK9KzGCEi127 Px1MrDf/yIRIrJc9avA4wpjvA+fK+4DpTlgOeGW5+AWv5/z1ua2qiHuq9A+plEXI8G/iVd 9q921kf8+Cw6am0Lk80rvNOuRBTZ2g/ypEqgh+oM0yxA4pAXY/JZTfndGjiexRGMv9s9aH HfisnU+6WEYhfJ49AF8lJ1NaKl9PsEAemiamccNMSsNTafvfZS+0cb0e2/kR+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RNCYk1DyMz1BqH; Sat, 12 Aug 2023 07:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37C7qQNR074184; Sat, 12 Aug 2023 07:52:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37C7qQUV074180; Sat, 12 Aug 2023 07:52:26 GMT (envelope-from git) Date: Sat, 12 Aug 2023 07:52:26 GMT Message-Id: <202308120752.37C7qQUV074180@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Sergio Carlavilla Delgado Subject: git: 92179ea675 - main - Handbook - Config: Add cpu frequency control section List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: carlavilla X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92179ea675b6f6e1ac02e7126ed036c54b883a56 Auto-Submitted: auto-generated The branch main has been updated by carlavilla: URL: https://cgit.FreeBSD.org/doc/commit/?id=92179ea675b6f6e1ac02e7126ed036c54b883a56 commit 92179ea675b6f6e1ac02e7126ed036c54b883a56 Author: Kyle Kneisl AuthorDate: 2023-08-12 07:48:07 +0000 Commit: Sergio Carlavilla Delgado CommitDate: 2023-08-12 07:48:07 +0000 Handbook - Config: Add cpu frequency control section Differential Revision: https://reviews.freebsd.org/D30004 Reviewed by: allanjude@, bcr@, debdrup@, carlavilla@, Pau Amma Approved by: kib@, gjb@ --- .../content/en/books/handbook/config/_index.adoc | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/documentation/content/en/books/handbook/config/_index.adoc b/documentation/content/en/books/handbook/config/_index.adoc index b82caf1419..f7d9cc27e2 100644 --- a/documentation/content/en/books/handbook/config/_index.adoc +++ b/documentation/content/en/books/handbook/config/_index.adoc @@ -1315,7 +1315,84 @@ And then enable the service executing the following command: # service powerd start .... +[[cpufreq]] +=== CPU Frequency Control +FreeBSD includes a generic man:cpufreq[4] driver to allow the administrator, or software such as man:powerd[8] and package:sysutils/powerdxx[], to manage the frequency of the CPU to achieve the desired balance between performance and economy. +A lower setting will save power while reducing the heat generated by the CPU. +A higher setting will increase performance at the cost of using additional power and generating more heat. + +[[est]] +=== Intel(R) Enhanced Speed Step(TM) + +The Intel(R) Enhanced Speed Step(TM) driver, man:est[4], replaces the generic man:cpufreq[4] driver for CPUs that provide this feature. +The CPU frequency can be statically adjusted using man:sysctl[8], or with the `/etc/rc.d/power_profile` startup script. +Additional software, such as man:powerd[8] or package:sysutils/powerdxx[], can be used to automatically adjust the CPU frequency based on processor utilization. + +Each supported frequency, along with its expected power consumption, can be listed by examining the man:sysctl[3] tree: + +[source,shell] +.... +# sysctl dev.cpufreq.0.freq_driver dev.cpu.0.freq_levels dev.cpu.0.freq +.... + +The output should be similar to the following: + +[.programlisting] +.... +dev.cpufreq.0.freq_driver: est0 +dev.cpu.0.freq_levels: 3001/53000 3000/53000 2900/50301 2700/46082 2600/43525 2400/39557 2300/37137 2100/33398 2000/31112 1800/27610 1700/25455 1500/22171 1400/20144 1200/17084 1100/15181 900/12329 800/10550 +dev.cpu.0.freq: 800 +.... + +A frequency 1 MHz higher than the maximum frequency of the CPU indicates the Intel(R) Turbo Boost(TM) feature. + +[[hwpstate_intel]] +=== Intel Speed Shift(TM) + +Users running newer Intel(R) CPUs may find some differences in dynamic frequency control when upgrading to FreeBSD 13. +A new driver for the Intel(R) Speed Shift(TM) feature set, available on certain SKUs, exposes the ability for the hardware to dynamically vary the core frequencies, including on a per core basis. +FreeBSD 13 comes with the man:hwpstate_intel[4] driver to automatically enable Speed Shift(TM) control on equipped CPUs, replacing the older Enhanced Speed Step(TM) man:est[4] driver. +The man:sysctl[8] `dev.cpufreq.%d.freq_driver` will indicate if the system is using Speed Shift. + +To determine which frequency control driver is being used, examining the `dev.cpufreq.0.freq_driver` oid. + +[source,shell] +.... +# sysctl dev.cpufreq.0.freq_driver +.... + +The output should be similar to the following: + +[.programlisting] +.... +dev.cpufreq.0.freq_driver: hwpstate_intel0 +.... + +This indicates that the new man:hwpstate_intel[4] driver is in use. +On such systems, the oid `dev.cpu.%d.freq_levels` will show only the maximum CPU frequency, and will indicate a power consumption level of `-1`. + +The current CPU frequency can be determined by examining the `dev.cpu.%d.freq` oid. + +[source,shell] +.... +# sysctl dev.cpu.0.freq_levels dev.cpu.0.freq +.... + +The output should be similar to the following: + +[.programlisting] +.... +dev.cpu.0.freq_levels: 3696/-1 +dev.cpu.0.freq: 898 +.... + +For more information, including on how to balance performance and energy use, and on how to disable this driver, refer to the man page man:hwpstate_intel[4]. + +[NOTE] +==== +Users accustomed to using man:powerd[8] or package:sysutils/powerdxx[] will find these utilities have been superseded by the man:hwpstate_intel[4] driver and no longer work as expected. +==== [[graphics-card-power-management]] === Graphics Card Power Management