我需要更改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
我收到了错误:
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
问题是如何才能完成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
您需要首先创建传输过滤器,它将TCP设置指定为NetTcpSetting对象,如下例所示.
New-NetTransportFilter -SettingName Custom -LocalPortStart 80 -LocalPortEnd 80 -RemotePortStart 0 -RemotePortEnd 65535
当您要修改设置时,将使用Set-NetTCPSetting命令行开关.因此,为什么您收到有关未找到的自定义对象的错误.创建传输过滤器后,您的原始命令可以修改设置.
Set-NetTCPSetting -SettingName Custom -InitialCongestionWindow 10 -CongestionProvider CTCP