search
HomeComputer TutorialsTroubleshootingPower and performance optimization

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

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

Statement
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
cmd怎么查看局域网所有ipcmd怎么查看局域网所有ipFeb 20, 2023 pm 02:22 PM

cmd查看局域网所有ip的方法:1、按“Win+R”快捷键打开“运行”窗口;2、在“运行”窗口中输入“CMD”后,按回车键;3、在打开的“命令提示符”界面中,输入命令“arp -a”并按回车键;4、从返回结果就可以看到本地局域网中的所有与本机通信的计算机IP地址。

如何在没有Microsoft帐户的情况下从CMD获取BitLocker恢复密钥如何在没有Microsoft帐户的情况下从CMD获取BitLocker恢复密钥Feb 19, 2024 pm 09:00 PM

此指南将介绍如何获取BitLocker恢复密钥,以便在必要时恢复访问加密数据。BitLocker是Windows设备的安全功能,用于保护数据免受未经授权的访问。如果您无法通过常规方式访问数据,恢复密钥是一种备用方法。您可以在没有微软账户或通过CMD的情况下获取48位的BitLocker恢复密钥,从而确保您始终能够访问并恢复您的重要数据。如何在没有微软帐号的情况下从CMD获取BitLocker恢复密钥?请按照以下建议获取BitLocker恢复密钥:使用命令提示符单击开始,搜索cmd,然后单击以管理

CMD关闭端口命令CMD关闭端口命令Nov 21, 2023 am 09:45 AM

使用CMD关闭端口的命令:1、使用CMD关闭特定端口;2、使用CMD关闭所有开放端口;3、使用CMD打开特定端口;4、使用CMD打开所有开放端口。

使用命令行打开任务管理器: 详细步骤使用命令行打开任务管理器: 详细步骤Dec 29, 2023 pm 10:59 PM

很多小伙伴在使用电脑的时候遇见某个软件卡住。电脑动不了的情况,这个时候就需要调出任务管理器来结束这个进程,那么如何用cmd打开任务管理器命令呢?,只要输入taskmgr后按回车即可,具体的解决方法下面一起来看看吧。用cmd打开任务管理器命令的步骤1、按住键盘上的Win+R键打开运行窗口,或点击左下角的“开始—运行”,在运行窗口中输入cmd,按Enter键打开cmd窗口。2、输入:C:\Windows\system32\taskmgr.exe,然后按Enter键,就能打开任务管理器了3、CMD打开

powershell和cmd的区别是什么powershell和cmd的区别是什么Jan 11, 2023 pm 02:23 PM

区别:1、运行Cmd时,只需占用不到1M的内存;而用PowerShell时,需要占用大约20M的内存。2、Cmd不支持语法高亮,PowerShell支持。3、用Cmd运行一些较为复杂、较为耗时的命令时,随意拖动命令行窗口时,窗口中的内容依然能够保持原样;但PowerShell不行。4、Cmd只能不能使用.net库中的命令,也不能使用Linux命令;而PowerShell可以。

cmdtelnet命令不被识别为内部或外部命令cmdtelnet命令不被识别为内部或外部命令Jan 03, 2024 am 08:05 AM

cmd窗口中提示telnet不是内部或外部命令这个问题想必曾经也深深的困扰着你吧,这个问题的出现并不是因为用户们的操作哪里有什么不对用户们也不用太担心只需要一些小小的操作设置就可以让cmd窗口提示telnet不是内部或外部命令这个问题迎刃而解,一起来看看小编今天为大家带来的cmd窗口提示telnet不是内部或外部命令解决办法吧。cmd窗口提示telnet不是内部或外部命令解决办法:1、打开电脑的控制面板。2、找到程序和功能。3、找到左侧的启动或关闭Windows功能。4、找到“telnet客户端

命令提示行CMD关闭Bitlocker加密的方法命令提示行CMD关闭Bitlocker加密的方法Jun 19, 2024 am 11:33 AM

管理员命令提示行中输入以下命令关闭manage-bde-offC:但是有时候出现如下提示:错误一此卷存储可以对其他卷运行自动解锁的一个或多个外部密钥。必须首先删除此类密钥,才能解锁此卷。此时需要先执行如下命令:(系统分区不是C的话更改下面的盘符)manage-bde-autounlock-ClearAllKeysc:错误二由于卷已锁定,此操作无法执行。manage-bde-unlockc:-rp123456789012345678901234567890123456789012345678注意:

cmd php乱码怎么办cmd php乱码怎么办Nov 22, 2022 am 10:29 AM

cmd php乱码的解决办法:1、在windows平台的cmd或shellpower中,执行php脚本并检查是否乱码;2、通过在php脚本里执行“exec("CHCP 65001");”命令去修改当前页码字符集即可。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool