Power and performance optimization

WBOY
Release: 2024-06-18 17:09:15
Original
498 people have browsed it

Nowadays, the smoothness of the website is crucial. However, as the functionality of the website increases, performance issues also arise. PHP editor Youzi specially brings you the topic of power and performance optimization, aiming to help you understand how to optimize the website and improve the user experience. This topic will delve into how to optimize database, cache, code and server configuration, etc., to help everyone solve performance bottlenecks, improve website speed, and provide users with a smoother browsing experience.

Power and performance optimization

Optimize the performance of the current power mode. Refer to Microsoft's official instructions, which will increase computer power consumption. It is recommended to switch to high performance before running this batch process.

Create a new text document, copy the following code, save it as the file name "Power and Performance Optimization.bat", save the type "All files (*.*)", double-click to run.

@echo off
rem 将当前电源计划上的 EPP 值降低到 0,使性能完全优于功耗
Powercfg -setacvalueindex scheme_current sub_processor PERFEPP 0
rem 将最小处理器性能状态限制为 100%
Powercfg -setacvalueindex scheme_current sub_processor PROCTHROTTLEMIN 100
rem 将最大处理器性能状态限制为 100%
Powercfg -setacvalueindex scheme_current sub_processor PROCTHROTTLEMAX 100
rem 调高处理器响应能力替代启用阈值和处理器响应能力替代启用时间,
rem 并降低处理器响应能力替代禁用阈值和处理器响应能力替代禁用时间。
rem 这之后,系统将很难进入响应能力替代状态。 处理器响应能力替代性能下限的默认值设置为 100,
rem 以便响应能力替代周期以最大频率运行。 你还可以降低处理器性能下限,
rem 降低处理器响应能力替代能源性能首选项上限,以便 HWP 调整频率。
Powercfg -setacvalueindex scheme_current sub_processor RESPENABLETHRESHOLD 100
Powercfg -setacvalueindex scheme_current sub_processor RESPDISABLETHRESHOLD 1
Powercfg -setacvalueindex scheme_current sub_processor RESPENABLETIME 10
Powercfg -setacvalueindex scheme_current sub_processor RESPDISABLETIME 1
Powercfg -setacvalueindex scheme_current sub_processor RESPPERFFLOOR 5
Powercfg -setacvalueindex scheme_current sub_processor RESPEPPCEILING 50
rem 启用处理器性能提升模式
Powercfg -setacvalueindex scheme_current sub_processor PERFBOOSTMODE 1
rem 服务器需要超低延迟,同时仍希望在空闲期间从低功耗中获益,你可以针对负载的任何增加来加快性能状态的提高,
rem 在负载下降时减慢该状态的降低。 以下命令将提高策略设置为“Rocket”来加快状态提高,并将降低策略设置为“单个”。
rem  提高和降低阈值分别设置为 10 和 8。
Powercfg.exe -setacvalueindex scheme_current sub_processor PERFINCPOL 2
Powercfg.exe -setacvalueindex scheme_current sub_processor PERFDECPOL 1
Powercfg.exe -setacvalueindex scheme_current sub_processor PERFINCTHRESHOLD 10
Powercfg.exe -setacvalueindex scheme_current sub_processor PERFDECTHRESHOLD 8
rem 处理器性能核心休眠最小核心数
Powercfg -setacvalueindex scheme_current sub_processor CPMINCORES 100
rem 处理器性能核心休眠最大核心数
Powercfg -setacvalueindex scheme_current sub_processor CPMAXCORES 50
rem 禁用实用程序分发(实用程序分发,它可降低处于合理稳定状态的工作负载的请求 CPU 频率来降低处理器功耗。
rem 但是,对于受到高活动突发影响的工作负载,或者在处理器之间快速随机转移工作负载的程序,
rem 实用程序分发不一定是一个很好的算法选择。)
Powercfg -setacvalueindex scheme_current sub_processor DISTRIBUTEUTIL 0
Powercfg -setactive scheme_current
Copy after login

The above is the detailed content of Power and performance optimization. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
cmd
source:20hn.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!