前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >渲染业务镜像优化

渲染业务镜像优化

原创
作者头像
Windows技术交流
修改2023-04-14 11:45:45
6720
修改2023-04-14 11:45:45
举报
文章被收录于专栏:Windows技术交流Windows技术交流

1、虚拟内存一般勾选系统自动管理

SystemPropertiesPerformance.exe /pagefile

也可以设置min,max范围

为了方便收集fulldump,我设置的最小值是物理内存+257,参考https://cloud.tencent.com/developer/article/1883616

2、关闭defender

防火墙和defender是紧密相连的2个名词,但实际是2个东西,二者区别参考http://t.zoukankan.com/catherinezyr-p-6690183.html。防火墙侧重如出入站规则拦截,defender侧重主动防御,简单理解defender就是充当杀毒防护软件的角色。

defender的特点就是敏感度很高,存在一定的误报率,如果没有业务漏洞、系统没有弱密码并且及时打补丁,一般来说很难从系统层面攻破。

windows系统本来就有defender相关的计划任务,并非一定有访问才会主动扫描对抗,有时候即便没有外部访问,defender相关的计划任务也会不定期扫描系统。

defender跑起来时CPU利用率升高符合预期,如果不需要业务程序被扫描,可以从defender里信任过滤,参考https://www.87com.com/post-6.html

defender相关计划任务,运行taskschd.msc 循着这个路径能找到,不需要的话可以手动禁用

\Microsoft\Windows\Windows Defender

简单点的话,下载禁用defender的.reg文件

http://windows-1251783334.cos.ap-shanghai.myqcloud.com/2016%2B2019forbid_defender.reg

执行reg import filename.reg

3、禁用系统自带的部分计划任务

【获取】

以Administrator身份运行powershell命令获取可能影响渲染的计划任务列表:

Get-ScheduledTask -TaskPath "\Microsoft\Windows\Data Integrity Scan\","\Microsoft\Windows\ApplicationData\","\Microsoft\Windows\Defrag\","\Microsoft\Windows\DiskCleanup\","\Microsoft\Windows\DiskDiagnostic\","\Microsoft\Windows\DiskFootprint\","\Microsoft\Windows\Windows Defender\" ,"\Microsoft\Windows\Maintenance\" ,"\Microsoft\Windows\Windows Defender" 2>$null

获取到的计划任务,部分可能需要system权限才能禁用,需要提权

【提权】如果是Administrator,一般不需要,如果Administrator都执行不了,那还是得提权,如果提权报错找不到网络名,可参考https://cloud.tencent.com/developer/article/2018160

下载psexec

https://live.sysinternals.com/PsExec.exe

https://live.sysinternals.com/PsExec64.exe

下载后放到服务器C:\Windows\System32目录下

然后以Administrator身份在cmd命令行执行

psexec.exe -accepteula -nobanner -i -s powershell

psexec.exe -accepteula -nobanner -i -s cmd

PsExec64.exe -accepteula -nobanner -i -s powershell

PsExec64.exe -accepteula -nobanner -i -s cmd

会打开一个有system权限(比Administrator权限大)的powershell窗口来执行如下禁用可能影响渲染的计划任务的命令

【禁用】

在psexec打开的powershell窗口里执行如下代码

Get-ScheduledTask -TaskPath "\Microsoft\Windows\Data Integrity Scan\","\Microsoft\Windows\ApplicationData\","\Microsoft\Windows\Defrag\","\Microsoft\Windows\DiskCleanup\","\Microsoft\Windows\DiskDiagnostic\","\Microsoft\Windows\DiskFootprint\","\Microsoft\Windows\Windows Defender\","\Microsoft\Windows\Maintenance\" 2>$null | Disable-ScheduledTask 2>$null

4、DirectX runtime libraries from the legacy DirectX SDK for some games that use D3DX9, D3DX10, D3DX11, XAudio 2.7, XInput 1.3, XACT, and/or Managed DirectX 1.1.

参考https://cloud.tencent.com/developer/article/1929052

5、微软VB/VC运行库合集

https://github.com/abbodi1406/vcredist/releases

6、清理日志,参考https://cloud.tencent.com/developer/article/2007127

"SAN Policy=OnlineAll" | diskpart

""

winrm quickconfig -force

Set-Item WSMan:localhost\client\trustedhosts -value * -Force

powercfg -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

powercfg -x -monitor-timeout-dc 0

powercfg -x -monitor-timeout-ac 0

stop-service BaradAgentSvc 2>&1 > $null

stop-service StargateSvc 2>&1 > $null

stop-service YDLive 2>&1 > $null

stop-service YDService 2>&1 > $null

stop-service tatsvc 2>&1 > $null

del "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\*" 2>&1 > $null

del "C:\Program Files\QCloud\Logs\*" 2>&1 > $null

del "C:\Program Files\QCloud\Monitor\Barad\logs\*" 2>&1 > $null

del "C:\Program Files\QCloud\Stargate\logs\*" 2>&1 > $null

del "C:\Program Files\QCloud\YunJing\log\*" 2>&1 > $null

del "C:\Windows\System32\Sysprep\Panther\*.log" 2>&1 > $null

del "C:\Windows\Panther\*.log" 2>&1 > $null

del "C:\Windows\Panther\UnattendGC\*.log" 2>&1 > $null

del "C:\cvm_init.log" 2>&1 > $null

del "C:\Windows\Logs\WindowsUpdate\*" 2>&1 > $null

del "C:\Windows\INF\setupapi.dev.log" 2>&1 > $null

del "C:\Windows\INF\setupapi.setup.log" 2>&1 > $null

wevtutil el | Foreach-Object {wevtutil cl "$_" 2>$null}

wevtutil cl security 2>$null

wevtutil cl system 2>$null

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff" /f 2>&1 > $null

reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles" /f 2>&1 > $null

cd "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations"

del *.automaticDestinations-ms

cmd.exe /c del /F /Q C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Recent\* 2>$null

cd c:\

Remove-Item (Get-PSReadlineOption).HistorySavePath

cmd.exe /c "echo.>%userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt"

clear-history

wevtutil el | Foreach-Object {wevtutil cl "$_" 2>$null}

wevtutil cl security 2>$null

wevtutil cl system 2>$null

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1、虚拟内存一般勾选系统自动管理
  • 2、关闭defender
  • 3、禁用系统自带的部分计划任务
相关产品与服务
云服务器
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档