当前位置:网站首页>Bcdedit, used to adjust the machine startup parameters (safe mode, BootMenu display name, CPU, memory, etc.)
Bcdedit, used to adjust the machine startup parameters (safe mode, BootMenu display name, CPU, memory, etc.)
2022-06-23 21:33:00 【shawyang】
Conclusion first :bcdedit /set and bcdedit /deletevalue Need to restart to take effect
bcdedit /set parameter_name parameter_value
bcdedit /deletevalue parameter_name
truncatememory and removememory Do not set at the same time , Microsoft recommends setting removememory To achieve the purpose of reducing memory
Microsoft recommends bcdedit Command to adjust the power on vCPU Number and memory size ,msconfig Show incorrect problem bill of lading to Microsoft , Microsoft acknowledges yes bug, It is not planned to repair at present , Let go bcdedit Command to adjust
below 3 After the command is executed, restart the machine to restore the startup CPU、 Memory configuration
bcdedit /deletevalue numproc
bcdedit /deletevalue truncatememory
bcdedit /deletevalue removememory
【powershell】
bcdedit /deletevalue numproc 2>$nul 1>$nul
bcdedit /deletevalue truncatememory 2>$nul 1>$nul
bcdedit /deletevalue removememory 2>$nul 1>$nul
【cmd】
bcdedit /deletevalue numproc 2>nul 1>nul
bcdedit /deletevalue truncatememory 2>nul 1>nul
bcdedit /deletevalue removememory 2>nul 1>nul
If not executed bcdedit /set parameter_name parameter_value Is executed bcdedit /deletevalue parameter_name It will report an error or execute the 1 All over bcdedit /deletevalue parameter_name If you continue to repeat the execution after you have succeeded, an error will be reported , So the command adds output redirection to hide the error
bcdedit, It is used to adjust the startup parameters of the machine ( safe mode 、bootmenu The display name 、CPU、 Memory, etc. )
1、 Set the boot to enter safe mode
Reference resources https://cloud.tencent.com/developer/article/1917677
2、 Set up bootmenu The display name
Reference resources https://cloud.tencent.com/developer/article/1871412 The tail
3、 Set power on vCPU The maximum number
Reference resources https://cloud.tencent.com/developer/article/1922477
bcdedit /set numproc <number>
Set the maximum number of logical processors at startup ( such as 8vCPU You can set the boot time to use 4 individual vCPU)
bcdedit /set numproc 4
Execute the following command to restore
bcdedit /deletevalue numproc
4、 Set the maximum boot memory
The graphical interface "msconfig command → guide → Advanced options → Maximum memory " The maximum boot memory set in this way may not be the set value after reboot , Because there is hardware reserved memory .
As Microsoft official documents say , because removememory Option to use system memory more efficiently , It is therefore recommended to use it instead of truncatememory.
truncatememory or removememory Options in Windows 7 And later .Truncatememory Option ignores all memory at or above the specified physical address .removememory Options can be selected in a specified amount ( With MB In units of ) Reduce memory . Both options reduce memory , But when considering memory gaps ,removememory Option will better restrict the operating system from using the specified memory .
for example 64G Memory machine , Execute the following command to set the boot 4G Memory , When I actually entered the system, I found that... Was retained after startup 61G Memory , All that can be used is 3G Memory
( There are rounding elements here , The reality is that... Is reserved for the hardware 61.xG, What can be used is 2.yG,x+y=1)
bcdedit /set truncatememory 0x100000000
The above commands follow the graphical interface "msconfig command → guide → Advanced options → Maximum memory " This method has the same effect ( Want to be available 4G, Actually available only 3G), But the unit of graphical interface mode is MB.
truncatememory 0x500000000,20480M, Set up 20G, actual 19G
truncatememory 0x200000000,8192M, Set up 8G, actual 7G
truncatememory 0x100000000,4096M, Set up 4G, actual 3G
truncatememory 0x80000000,2048M, Set up 2G, actual 2G
truncatememory 0x40000000,1024M, Set up 1G, actual 1G
truncatememory 0x20000000,512M, Set up 0.5G, actual 0.5G
Execute the following command to restore
bcdedit /deletevalue truncatememory
use removememory You can also set the startup 4G Memory , With 64G Memory machine as an example , The order is as follows
# When n=64 when , cut down 60G、 Set the startup maximum 4G Memory , The algorithm is : Reduced memory = Total memory - Boot memory =1024*(n-4)=1024*60=61440
bcdedit /set removememory 61440
Execute the following command to restore
bcdedit /deletevalue removememory
Be careful :
removememory and truncatememory The units of numbers are different
removememory yes MB
truncatememory yes Byte
truncatememory and removememory Do not use at the same time
truncatememory and removememory Do not use at the same time
truncatememory and removememory Do not use at the same time
truncatememory and removememory There is one 1GB The difference of
64G Memory machine , Set power on 20G Memory 、8G Memory 、4G Memory 、2G Memory 、1G Memory 、512M Memory boot , The order is as follows
# When n=64 when , cut down 44G、 Set the startup maximum 20G Memory , The algorithm is : Reduced memory =1024*(n-20)=1024*44=45056
bcdedit /set removememory 45056
perform bcdedit /deletevalue removememory To restore
# When n=64 when , cut down 56G、 Set the startup maximum 8G Memory , The algorithm is : Reduced memory = Total memory - Available memory =1024*(n-8)=1024*56=57344
bcdedit /set removememory 57344
perform bcdedit /deletevalue removememory To restore
# When n=64 when , cut down 60G、 Set the startup maximum 4G Memory , The algorithm is : Reduced memory = Total memory - Available memory =1024*(n-4)=1024*60=61440
bcdedit /set removememory 61440
perform bcdedit /deletevalue removememory To restore
# When n=64 when , cut down 62G、 Set the startup maximum 2G Memory , The algorithm is : Reduced memory = Total memory - Available memory =1024*(n-2)=1024*62=63488
bcdedit /set removememory 63488
perform bcdedit /deletevalue removememory To restore
# When n=64 when , cut down 63G、 Set the startup maximum 1G Memory , The algorithm is : Reduced memory = Total memory - Available memory =1024*(n-1)=1024*63=64512
bcdedit /set removememory 64512
perform bcdedit /deletevalue removememory To restore
# When n=64 when , cut down 63.5G、 Set the startup maximum 0.5G Memory , The algorithm is : Reduced memory = Total memory - Available memory =1024*(n-0.5)=1024*63.5=65024
bcdedit /set removememory 65024
perform bcdedit /deletevalue removememory To restore
边栏推荐
- Markdown syntax summary
- This article introduces you to the necessity of database connection pooling
- What about the cloud disk service status error? How to format the cloud disk service?
- SAP Migo mobile type 311 attempts to determine the batch, and the system reports an error -batch determination not Po
- 手机卡开户的流程是什么?在线开户安全么?
- 蓝牙芯片|瑞萨和TI推出新蓝牙芯片,试试伦茨科技ST17H65蓝牙BLE5.2芯片
- Infrastructure splitting of service splitting
- Global and Chinese market of microphone racks 2022-2028: Research Report on technology, participants, trends, market size and share
- Spend small money to do big things: cloud function + cloud development leverages the practice of e-commerce promoting flexible architecture in CCTV evening party
- What hard disk does the ECS use? What are the functions of the ECS
猜你喜欢

New SQL syntax quick manual!

What are the main dimensions of PMO performance appraisal?

Four aspects of PMO Department value assessment
![Harmonyos application development -- mynotepad[memo][api v6] based on textfield and image pseudo rich text](/img/b1/71cc36c45102bdb9c06e099eb42267.jpg)
Harmonyos application development -- mynotepad[memo][api v6] based on textfield and image pseudo rich text

How does PMO select and train project managers?

Steps for formulating the project PMO strategic plan

Uncover the secrets of Huawei cloud enterprise redis issue 16: acid'true' transactions beyond open source redis

Gradle asked seven times. You should know that~

How to view the role of PMO in agile organizations?

I am 30 years old, no longer young, and have nothing
随机推荐
What software is safe to use to fight new debts? What are the new bond platforms
What if there are too few jetpack compose theme colors? Design your own color system
Prometheus primary body test
SAP FICO as03 display fixed assets master data
【etcd】etcd使用与集群搭建
[JS reverse hundred examples] anti climbing training platform for netizens question 6: JS encryption, environment simulation detection
JS how to get the current local date
How to evaluate performance optimization? Covering too much knowledge?
Wechat is new. You can create applications from Excel
大一女生废话编程爆火!懂不懂编程的看完都拴Q了
Share a super Mary source code
Real time crawler launches a number of special new products
Cloud database smooth disassembly scheme
游戏安全丨喊话CALL分析-写代码
Game security - call analysis - write code
Full instructions for databinding
A detailed discussion on the use guide of network Swiss Army knife nmap
SAP retail uses transaction code wb03 to display a factory configured in the background
Global and Chinese market for hydropower plants 2022-2028: Research Report on technology, participants, trends, market size and share
ASP. Net MVC and asp Net web form