윈도우 TCP 튜닝
대용량 데이터 전송을 위한 Windows 의 TCP 성능 파라미터 조정 방법
Windows Server Essentials 2019 이후 버전을 구매하여 적용할 것
1. 알림
Windows는 데스크탑용 OS의 TCP 파라미터 변경이 제한적임.
몇몇 파라미터는 set 명령어가 존재하나, read-only 라서 변경이 되지 않음.
Windows Server Essentials 2019 이후 버전을 구매할 것 (Windows 10 대비 5배 가격)
본 페이지에서는 netsh 명령어를 이용함.
윈도우 10 이후 추후 출시되는 OS에서는 netsh 명령어가 사라지고(will be depricated),
파워쉘 내의 Set-NetTCPSetting 명령어로 TCP 파라미터를 변경해야 함
2. 관리자 권한으로 cmd 띄우기
3. 쉘 표시 언어를 영어로 변경
추후 궁금한 사항이 생겼을 때 영어로 구글링 하기 위함
chcp 437
4. 추천 파라미터 입력
netsh int tcp set global ecncapability=disabled netsh interface tcp set supplemental template=internet congestionprovider=cubic netsh int tcp set heuristics disabled
timestamps 는 다음 2개 중 성능 좋은 것을 선택
netsh int tcp set global timestamps=enable netsh int tcp set global timestamps=disable
autotuninglevel 은 다음 2개 중 성능 좋은 것을 선택
netsh int tcp set global autotuninglevel=disabled netsh int tcp set global autotuninglevel=experimental
| 파리미터 | 기본값 | 추천값 | 설명 | 데스트톱 OS |
|---|---|---|---|---|
| InitialCongestionWindow(MSS) | 10 | 64 | Initial size of the congestion window value : 2~64 |
|
| CongestionProvider | CUBIC | CUBIC | ||
| AutoTuningLevelLocal | Disabled | 다음 2가지 중 Disabled Experimental | Specifies a TCP auto-tuning level for the host computer value
| |
| EcnCapability | Disabled | Disabled | ||
| Timestamps | Disabled | 다음 2가지 중 Enabled Disabled | Specifies whether to enable timestamps Timestamps facilitate round trip measurement, and can help protect against wrapped sequence numbers on high throughput links. 장거리 전송 및 불안정한 링크에서는 TimeStamp 붙이는 것이 좋음 | |
5. 적용된 파라미터 확인
netsh interface tcp show global netsh interface tcp show supplemental netsh interface tcp show heuristics netsh interface ipv4 show interfaces
C:\Windows\system32> netsh interface tcp show global
Querying active state...
TCP Global Parameters
----------------------------------------------
Receive-Side Scaling State : enabled
Receive Window Auto-Tuning Level : disabled
Add-On Congestion Control Provider : default
ECN Capability : disabled
RFC 1323 Timestamps : enabled
Initial RTO : 1000
Receive Segment Coalescing State : enabled
Non Sack Rtt Resiliency : disabled
Max SYN Retransmissions : 4
Fast Open : enabled
Fast Open Fallback : enabled
HyStart : enabled
Pacing Profile : off
C:\Windows\system32> netsh interface tcp show supplemental
The TCP global default template is internet
TCP Supplemental Parameters
----------------------------------------------
Minimum RTO (msec) : 300
Initial Congestion Window (MSS) : 10
Congestion Control Provider : cubic
Enable Congestion Window Restart : disabled
Delayed ACK timeout (msec) : 40
Delayed ACK frequency : 2
Enable RACK : enabled
Enable Tail Loss Probe : enabled
C:\Windows\system32> netsh interface tcp show heuristics
TCP Window Scaling heuristics Parameters
----------------------------------------------
Window Scaling heuristics : disabled
Qualifying Destination Threshold : 3
Profile type unknown : normal
Profile type public : normal
Profile type private : normal
Profile type domain : normal
C:\Windows\system32> netsh interface ipv4 show interfaces
Index Metric MTU Status Name
----- ------ ----- --------- ------------------
1 75 1500 connected Loopback Interface
3 1 1500 connected Ethernet
참고문서
https://fasterdata.es.net/host-tuning/ms-windows/
https://docs.microsoft.com/en-us/powershell/module/nettcpip/set-nettcpsetting?view=win10-ps
