type
status
date
slug
summary
tags
category
icon
password
前置准备:
- 测量外部功耗用于大致判断功耗情况(闲置状态下,电池输出 - CPU Package功耗)
- 闲置情况下CPU package 功耗,用于调整负载时的目标功耗
基本方法:使用HWinfo观察
- 目标应用负载下的核心频率、功耗
- 不同功耗下CPU Package power
- 通过调整“最大处理器状态”,让CPU频率处于略微满足目标应用功耗的状态,测量得到“核心负载”,“核心频率”,“CPU package功耗”,以此为调整目标
- 核心负载用于调整性能提升、降低阈值
- 通过核心频率、CPU package 功耗参数,使用XTU调整P1,P2目标达到调整目标
基本信息检测
使用HWinfo,这里的参考配置是 R7000 4800H 144Hz 2SSD
基本硬件信息 + 硬件功耗检测项目
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F092871e8-2280-41b3-8fd8-0147c211b636%2FUntitled.png?table=block&id=7ad2ab72-d967-4ecd-ac46-c175f375969f&t=7ad2ab72-d967-4ecd-ac46-c175f375969f&width=636&cache=v2)
确定空载baseline
仅运行自启动程序(utools + everything),80屏幕亮度,连接无线鼠标
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F6c86bcc8-3ca9-405e-9335-c90db85b7d84%2FUntitled.png?table=block&id=e73a428a-958f-4a25-85fd-2ddcbac891f3&t=e73a428a-958f-4a25-85fd-2ddcbac891f3&width=652&cache=v2)
各应用负载测量
例如播放b站视频,使用HWinfo平均值测量一段时间(注意重置测量范围)
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F9aa757ca-d0da-4493-b4fb-8af6368a073a%2FUntitled.png?table=block&id=1ba55894-b43c-49b8-9b48-4d78cdcb0301&t=1ba55894-b43c-49b8-9b48-4d78cdcb0301&width=2008&cache=v2)
调整处理器性能提升、降低阈值
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F7cc34642-4346-474c-aeb2-7a56d924cbf8%2FUntitled.png?table=block&id=a443981b-518b-49e2-8eb0-5e65652f20f8&t=a443981b-518b-49e2-8eb0-5e65652f20f8&width=2752&cache=v2)
播放视频时依然位置较低睿频,但可能由于GPU调用导致功耗分配至GPU
bilibili
逍遥橙子原作者已停止更新,项目由其他人继续维护
biliuwp-lite
ywmoyue • Updated Aug 29, 2023
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F6d9a4b2b-c1cf-442e-b34e-e1d68f214f3b%2FUntitled.png?table=block&id=ae8903fd-b5f9-4a54-97b2-5fcea647c8c4&t=ae8903fd-b5f9-4a54-97b2-5fcea647c8c4&width=1111&cache=v2)
使用该版本应用关闭弹幕时功耗可以维持在13-14w,基本与静止功耗持平。原电池容量60wh使用95%容量基本可以持续观看4.2小时
新版网页B站
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F129b4024-c7f2-48fc-a70c-389b32f74be6%2FUntitled.png?table=block&id=82576f0c-8dbf-4b38-a783-2cd6b98750ac&t=82576f0c-8dbf-4b38-a783-2cd6b98750ac&width=4096&cache=v2)
旧版网页B站
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F12cc8253-559d-49c1-9a81-82efe8c78a57%2FUntitled.png?table=block&id=214c9c0c-7392-43a9-8c00-42f42ea4dac4&t=214c9c0c-7392-43a9-8c00-42f42ea4dac4&width=4096&cache=v2)
逍遥橙子 UWP
biliuwp-lite
ywmoyue • Updated Aug 29, 2023
经过调整后,不开启弹幕的情况下最终功耗10w左右
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F0bfc2f6e-cc56-4903-933c-e36d4f1d165f%2FUntitled.png?table=block&id=45a5010a-860e-4887-8f5a-e5944a53b9b3&t=45a5010a-860e-4887-8f5a-e5944a53b9b3&width=1280&cache=v2)
新版QQ
可能没有显著功耗提升
新版QQ默认被放置在高性能GPU上,需要在windows设置中手动放置在节能GPU上
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2Fe519e456-9564-4016-adb9-d278d8cef9a0%2FUntitled.png?table=block&id=f9c0520c-21c3-4176-bd70-2c08fa548063&t=f9c0520c-21c3-4176-bd70-2c08fa548063&width=575&cache=v2)
notion + edge
打字、输入截图时功耗会有所上升
感觉上通常在15w上下浮动,感觉edge中使用所有应用都算不上节能了
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F8cd56a8a-7493-4b09-9087-d7a8db5460f6%2FUntitled.png?table=block&id=ab3e1206-eeeb-4adc-b2e0-90dfe4330a10&t=ab3e1206-eeeb-4adc-b2e0-90dfe4330a10&width=1615&cache=v2)
下面是进阶内容参考
AMD-APU-Tuning Utility
AMD-APU-Tuning-Utility
JamesCJ60 • Updated Aug 30, 2023
感觉和还本的节电模式有点像,设置后notion中打字响应变得很慢
通过放宽slow powerlimit和fast power limit,关闭温度控制缓解了这一现象
观察到IF总线频率上升明显
现在频率限制应该降低了许多,打字不再会卡顿
微软 Processor power management options overview 相关文档
根据介绍,Windows 10 processor power management (PPM)的特性有
- 广泛适用
- 静态config power policy
- 层次化、抽象化(实现泛用)
在最高层次上,PPM包括
- core parking engine
- Performance state engine
- platform specific controls
由于我的硬件无法使用PPM,因此需要依赖p state。如果硬件支持CPPC,可能有其他更好的方法
Power profiles
The power profiles are used by the power processor engine to adapt the performance and parking algorithm on various system use cases.
profile有多种类型,这里认为需要修改的有
- Default 多数时候使用
- LowLatency OS启动和应用启动时使用
- LowPower
- GameMode
- Constrained
- ScreenOff
- Standby
PowerCfg 设置
windows 的功耗管理分为Overlay power schemes和PPM profiles,其中Overlay power schemes就是我们在powersettingsexplorer中修改的配置,比较粗糙。Overlay power schemes现在只影响自定义设置
通过powercfg 设置,模板为
powercfg /setacprofileindex overlay_or_scheme_alias profile_alias setting_alias value
core parking
个人认为锐龙日常负载倾向于使用所有核
在某些HPC系统中进行GPU计算时,CPU负责分发与管理,此时我倾向于提升单核睿频
performance state engine
- MaxFrequency
- MaxPerformance
- MinPerformance
- PERFBOOSTMODE (可能区别不大)
- autonomousMode 和 energyPreference
由于4800H不支持CPPC,因此下面的类似功能无法使用
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F39b9b0fb-8bcb-4fab-a1de-54465bf83ac9%2FUntitled.png?table=block&id=a5e27239-ab7b-4fe6-a025-beebd1fe3ffd&t=a5e27239-ab7b-4fe6-a025-beebd1fe3ffd&width=288&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2Ffbb2a196-7bfe-4346-9b06-82ed7390a1ac%2FUntitled.png?table=block&id=3cafa199-2ca3-4c14-8352-f2cfe691e76b&t=3cafa199-2ca3-4c14-8352-f2cfe691e76b&width=288&cache=v2)
- duty cycling 根据up主确认,AMD没有硬件支持duty cycling
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2Fc3cfa446-9a96-43d7-8b5d-e66529d9491f%2FUntitled.png?table=block&id=fed098c6-c556-4e93-a45f-c092917c7d41&t=fed098c6-c556-4e93-a45f-c092917c7d41&width=705&cache=v2)
- UnparkPolicy
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2Fd5a60d10-c4af-4ade-a682-ae784b087c24%2FUntitled.png?table=block&id=d0d35cc1-beee-4521-bca2-492059058f70&t=d0d35cc1-beee-4521-bca2-492059058f70&width=581&cache=v2)
0 没有偏好
1 轮询
2
由于经验,当负载较低且均分时功耗较低,这里尝试使用1策略
SmtUnparkPolicy 条目中我倾向于使用超线程
heterogeneous power scheduling
文档中有这一块内容,但我并非混合架构,因此不做过多研究
通过以上的设置,达到了积极的提频调度,积极地降频节能,但由于不支持CPPC,调整速度略微有些缓慢
打开edge、qq、clash等常用软件,全亮度状态下,静止功耗能达到-12.5w左右
观察到功耗提升过程中,使用没有出现卡顿,功耗缓慢上升至-15w左右,并在停止画面变化时下降至-13w
鼠标滚动notion文档开始时出现轻微卡顿,随后恢复正常
可能的下一步优化方向
- APU controller 限制APU SOC总功耗上限,效果较好,但可能对性能影响较大
- 降压
- 单进程、场景化profile
编辑这一段文字时的功耗截图
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2Fb10d548d-b8b0-4899-91b7-00cc9c9a28ea%2FUntitled.png?table=block&id=14f148c0-e0c0-447c-825f-2f3b6d21e16a&t=14f148c0-e0c0-447c-825f-2f3b6d21e16a&width=1920&cache=v2)
根据AMD文档,GPU需要从memory或者cache中存取画面缓存,因此个人猜测在画面剧烈变化时,IF和内存控制器频率显著上升,造成功耗激增到-20w左右
持续的画面变化,包括输入框,会导致if和cache频率上升显著,达到最高频率,停止后则迅速下降
观察到一些thread进行了睿频,单实际上负载远未达到设定的70%
PowerCfg + 场景profile
微软 Power and performance tuning 相关文档
功耗问题诊断 Diagnosing energy efficiency issues
用于发现闲时耗电问题
官方工具
powercfg.exe /energy
60秒检测报告电源计划 Power Plans
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2Fd7619575-3ce0-47b6-aaf8-8fbe16282818%2FUntitled.png?table=block&id=7874ca7c-93f4-4b6c-bc5f-bf6188da0dfb&t=7874ca7c-93f4-4b6c-bc5f-bf6188da0dfb&width=562&cache=v2)
厂商在BIOS内可能有自己的功耗控制选项,这些选项可能不会生效
Intel Hardware Controlled P-states (HWP)
启用HWP后,OS不需要周期性地间隔检查并调整频率
具体优势有:
- 相应时间 OS调整速度:最高30ms-最低15ms,HWP调整速度:1ms
- 调整恰当 CPU自己更熟悉各个性能状态的能耗表现
- 关联信息 将其他硬件的状态纳入考虑范围
OS仍然可以限制min max频率状态
Processor energy performance preference policy (EPP) 参数用于指导HWP节能或性能偏向
Processor energy performance preference policy
0偏向性能,100偏向节能,默认50
最大、最小处理器状态 Minimum and maximum processor performance state
处理器最大频率的百分比
实际上感觉应该不包括睿频
稳定响应速度和性能,将最小状态设定在100%
需要查看处理器手册确认是否支持
响应速度 Processor responsiveness override
Windows的电源管理算法基于一段窗口时间内CPU的利用率
这种方式影响磁盘IO,重负载网络的延迟
因为在等待IO时,CPU利用率较低,导致OS误认为负载较低并降低频率
HWP一样有这个问题
DPCs功能就是为了解决这个问题,PPM进入IO响应状态,并提高频率
具体调节
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F40cb53b6-e0a7-494c-bbf2-18c460cee2fa%2FUntitled.png?table=block&id=4ce00fff-85c2-4fcb-82b0-f95bf4c473a1&t=4ce00fff-85c2-4fcb-82b0-f95bf4c473a1&width=574&cache=v2)
如果对延迟不敏感
- increase
- Processor responsiveness override enable threshold
- Processor responsiveness override enable time
- decrease
- Processor responsiveness override disable threshold
- Processor responsiveness override disable time
此外 Processor responsiveness override performance floor 控制频率
通过 reduce the Processor responsiveness override energy performance preference ceiling 让HWP决定频率
Processor performance boost mode
Turbo功耗上升显著
Balanced状态默认传统P-state-based频率管理
EP8寄存器 与 Turbo的关系
Collaborative Processor Performance Control (CPPC)是基于ACPI 5.0的新的os和硬件协同最佳性能等级的特性
Processor Performance Boost Mode 5个等级
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F748fdbd6-a967-4319-ba3d-0ada75a0f2df%2FUntitled.png?table=block&id=ab8b6a81-ab04-48b8-9e0f-2bbe4d92f8d8&t=ab8b6a81-ab04-48b8-9e0f-2bbe4d92f8d8&width=557&cache=v2)
处理器性能提升、降低模式 Processor performance increase and decrease of thresholds and policies
针对非HWP系统
AMD Feature
最终效果、表现
- 闲置时都能缓慢降低功耗
- 所有core只能保持14x倍频,使用上有轻微卡顿感,尤其是有大幅度变化时
- AMD SOC功耗为CPU PPT的估计值,和battery输出差值在7w~10w左右波动
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe11fbe68-040d-41a6-8b37-0405a354bcd8%2F7af208c4-5713-4d58-bb01-88e7b33afd78%2FUntitled.png?table=block&id=afeaf1bf-70aa-4b84-a476-34f5f19ebf4c&t=afeaf1bf-70aa-4b84-a476-34f5f19ebf4c&width=634&cache=v2)
References
- Author:NotionNext
- URL:https://tangly1024.com/article/windows%20Ryzen%204800H%E5%8A%9F%E8%80%97%E6%8E%A7%E5%88%B6
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts