Windows Server 2012 R2 和 TCP 慢启动和 Hyper-v 主机

Tim*_*o77 5 powershell hyper-v-server-2012 windows-server-2012-r2

我需要更改 TCP InitialCongestionWindow 的默认值

我阅读了这个文件:https : //www.iispeed.com/blog/windows-server-2012-and-tcp-slow-start

我在我们的 hyper-v 托管虚拟服务器 2012 R2 上进行了尝试。

PS C:\>Set-NetTCPSetting -SettingName Custom -InitialCongestionWindow 10 -CongestionProvider CTCP
Run Code Online (Sandbox Code Playgroud)

我有错误:

Set-NetTCPSetting : No MSFT_NetTCPSetting objects found with property 'SettingName' equal to 'Custom'.  Verify the valu
e of the property and retry.
At line:1 char:1
+ Set-NetTCPSetting -SettingName Custom -InitialCongestionWindow 10 -CongestionPro ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Custom:String) [Set-NetTCPSetting], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_SettingName,Set-NetTCPSetting
Run Code Online (Sandbox Code Playgroud)

问题是我如何才能完成 IISspeed 文档所讲述的内容?如果我在 Hyper-v 机器上更改此设置,我是否也需要在 hypers-v 主机上更改此设置才能真正发挥作用?

我也应该对 SSL 端口 443 进行相同的更改吗?

我运行了这个命令:

PS C:\Users\Administrator> Get-NetTCPSetting


SettingName                   : Automatic
MinRto(ms)                    :
InitialCongestionWindow(MSS)  :
CongestionProvider            :
CwndRestart                   :
DelayedAckTimeout(ms)         :
DelayedAckFrequency           :
MemoryPressureProtection      :
AutoTuningLevelLocal          :
AutoTuningLevelGroupPolicy    :
AutoTuningLevelEffective      :
EcnCapability                 :
Timestamps                    :
InitialRto(ms)                :
ScalingHeuristics             :
DynamicPortRangeStartPort     :
DynamicPortRangeNumberOfPorts :
AutomaticUseCustom            :
NonSackRttResiliency          :
ForceWS                       :
MaxSynRetransmissions         :

SettingName                   : InternetCustom
MinRto(ms)                    : 300
InitialCongestionWindow(MSS)  : 4
CongestionProvider            : CTCP
CwndRestart                   : False
DelayedAckTimeout(ms)         : 50
DelayedAckFrequency           : 2
MemoryPressureProtection      : Enabled
AutoTuningLevelLocal          : Normal
AutoTuningLevelGroupPolicy    : NotConfigured
AutoTuningLevelEffective      : Local
EcnCapability                 : Enabled
Timestamps                    : Disabled
InitialRto(ms)                : 3000
ScalingHeuristics             : Disabled
DynamicPortRangeStartPort     : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom            : Disabled
NonSackRttResiliency          : Disabled
ForceWS                       : Disabled
MaxSynRetransmissions         : 2

SettingName                   : DatacenterCustom
MinRto(ms)                    : 20
InitialCongestionWindow(MSS)  : 4
CongestionProvider            : DCTCP
CwndRestart                   : True
DelayedAckTimeout(ms)         : 10
DelayedAckFrequency           : 2
MemoryPressureProtection      : Enabled
AutoTuningLevelLocal          : Normal
AutoTuningLevelGroupPolicy    : NotConfigured
AutoTuningLevelEffective      : Local
EcnCapability                 : Enabled
Timestamps                    : Disabled
InitialRto(ms)                : 3000
ScalingHeuristics             : Disabled
DynamicPortRangeStartPort     : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom            : Disabled
NonSackRttResiliency          : Disabled
ForceWS                       : Disabled
MaxSynRetransmissions         : 2

SettingName                   : Compat
MinRto(ms)                    : 300
InitialCongestionWindow(MSS)  : 2
CongestionProvider            : Default
CwndRestart                   : False
DelayedAckTimeout(ms)         : 200
DelayedAckFrequency           : 2
MemoryPressureProtection      : Enabled
AutoTuningLevelLocal          : Normal
AutoTuningLevelGroupPolicy    : NotConfigured
AutoTuningLevelEffective      : Local
EcnCapability                 : Enabled
Timestamps                    : Disabled
InitialRto(ms)                : 3000
ScalingHeuristics             : Disabled
DynamicPortRangeStartPort     : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom            : Disabled
NonSackRttResiliency          : Disabled
ForceWS                       : Disabled
MaxSynRetransmissions         : 2

SettingName                   : Datacenter
MinRto(ms)                    : 20
InitialCongestionWindow(MSS)  : 4
CongestionProvider            : DCTCP
CwndRestart                   : True
DelayedAckTimeout(ms)         : 10
DelayedAckFrequency           : 2
MemoryPressureProtection      : Enabled
AutoTuningLevelLocal          : Normal
AutoTuningLevelGroupPolicy    : NotConfigured
AutoTuningLevelEffective      : Local
EcnCapability                 : Enabled
Timestamps                    : Disabled
InitialRto(ms)                : 3000
ScalingHeuristics             : Disabled
DynamicPortRangeStartPort     : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom            : Disabled
NonSackRttResiliency          : Disabled
ForceWS                       : Disabled
MaxSynRetransmissions         : 2

SettingName                   : Internet
MinRto(ms)                    : 300
InitialCongestionWindow(MSS)  : 4
CongestionProvider            : CTCP
CwndRestart                   : False
DelayedAckTimeout(ms)         : 50
DelayedAckFrequency           : 2
MemoryPressureProtection      : Enabled
AutoTuningLevelLocal          : Normal
AutoTuningLevelGroupPolicy    : NotConfigured
AutoTuningLevelEffective      : Local
EcnCapability                 : Enabled
Timestamps                    : Disabled
InitialRto(ms)                : 3000
ScalingHeuristics             : Disabled
DynamicPortRangeStartPort     : 49152
DynamicPortRangeNumberOfPorts : 16384
AutomaticUseCustom            : Disabled
NonSackRttResiliency          : Disabled
ForceWS                       : Disabled
MaxSynRetransmissions         : 2
Run Code Online (Sandbox Code Playgroud)

ben*_*tek 4

您需要首先创建传输过滤器,它将 TCP 设置指定为NetTcpSetting对象,如下例所示。

New-NetTransportFilter -SettingName Custom -LocalPortStart 80 -LocalPortEnd 80 -RemotePortStart 0 -RemotePortEnd 65535
Run Code Online (Sandbox Code Playgroud)

Set-NetTCPSetting当您想要修改设置时,可以使用命令行开关。因此,为什么您会收到有关未找到自定义对象的错误。创建传输过滤器后,修改设置的原始命令应该可以工作。

Set-NetTCPSetting -SettingName Custom -InitialCongestionWindow 10 -CongestionProvider CTCP 
Run Code Online (Sandbox Code Playgroud)