节能在下降能耗的同时也意味着性能的降低。下面介绍的是在 BIOS 这个层面涉及到的一些节能开关,比较具备通用性。
1. Turbo boost
跟超频有关,详细的请看这里。html
2. C1E, C state
hardwaresecrets 有一篇介绍 Cx state 的文档,比 wiki 上的介绍的更详细。ide
3. cpu stepping
CPU 版本控制的机制 工具
tomshardware 的这篇测试量化了使用了各类节能设置后,对 SSD 的影响,仅仅开启了 C1E 对总体的性能没有特别大的影响,若是是将全部跟 C states、Active State Power Management相关选项的都开启,会看到明显的降低。另外,文章建议开启 C1E 模式,这个对总体的性能没有太大的影响,同时又能下降功耗。另外须要注意的是,这些功耗的开关对于 HHD 并无显著的提升,仅对 SSD 有效。性能
dell 官方有一篇 《low latency env》的参考配置,里面涉及到很多 BIOS 层面的东西。主要分为 "System Profile Setting" 以及 "Memory setting" 和 "Processor Setting" 这三大块,其中效果最明显的应该是第一个 "System Profile Setting"。这个会在下面的 syscfg 里面提到。测试
关于 syscfg 这个工具,几个经常使用的参数:fetch
查看 sysprofile 指令的解释:
# ./syscfg -h –SysProfilespa
导入导出:
# ./syscfg -i/o config版本控制
下面的几个就是上面官方文档提到的几个参数:
–QpiSpeed
–logicproc
–virtualization
–hwprefetcher
–adjcacheprefetch
–memtest
–turbomode
–cpuc1e
–cstates
–MonitorMwait
–MemPatrolScrub
–MemRefreshRate
–SysProfileorm
对于 DELL 的 BIOS 来讲,一共有 5 类不一样的 profile setting。默认是 "performance per watt(dapc)",而咱们更关心的是 "performance" 这个 profile,他表示以下的几个指令的组合:
1. CPU Power Management = Maximum Performance
2. Memory Frequence = Manimum Performance
3. Turbo Boost = Enabled
4. C1E = Disable
5. C states = Disable
6. Monitor/Mwait = Enable
7. Memory Patrol Scrub = Standard
8. Memory Refresh Rate = 1x
9. Memory Operating Voltage = auto
10. Collabrative CPU Performance Control = Disableserver
调整以后,效果应该仍是很明显的,能够看 serverfault 上的这个 issue。
上面全部的若是想批量执行的话,放到 dtk 里面就行了。
另外,有点要提到的是,dmesg 常常报 "Core power limit normal" 的 log,access 上并无写明问题根源,后来发 ticket 确认,对机器没有影响,只是 BIOS 为了节能而调控 CPU 的一种方式。若是不想看到此类信息,直接将 BIOS 设置成 "performance" 而非 "performance per watt(dapc)" 就行了。