jmeter requirement
웹서비스의 스트레스 테스트 및 동접 부하 테스트를 진행중임.
테스트 도구는 순간 동시요청 숫자와 비례하게 CPU 를 사용한다.
너무 저렴한 머신을 사용하지 말것. 머신은 일반적인 i7 급 성능은 나와주어야 한다.
테스트는 Windows OS 머신에서 진행했음.
네트워크 튜닝이 필요했음. 관련 가이드 문서를 읽고 수정을 진행함.
1. 사용가능한 포트 범위 확장
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
MaxUserPort 라는 DWORD 타입의 값을 추가하고 65534 를 입력. 기본값은 5000 이다. (일부 운영체제는 기본값이 16384)
MaxUserPort
Key: Tcpip\Parameters
Value Type: REG_DWORD—maximum port number
ValidRange: 5000–65534 (decimal)
Default: 0x1388 (5000 decimal)
Description: This parameter controls the maximum port number used when an application requests any available user port from the system. Normally, short-lived ports are allocated in the range from 1024 through 5000. Setting this parameter to a value outside of the valid range causes the nearest valid value to be used (5000 or 65534).
확인 명령어
netsh int ipv4 show dynamicport tcp
2. 사용 완료된 포트 재사용 대기시간 줄이기
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
TcpTimedWaitDelay 라는 DWORD 타입의 값을 추가하고 decimal 30 를 입력. 기본값은 decimal 120 이라고 한다. (일부 운영체제는 기본값이 240)
TcpTimedWaitDelay
Key: Tcpip\Parameters
Value Type: REG_DWORD—time in seconds
ValidRange: 30-300 (decimal)
Default: 0xF0 (120 decimal)
Description: This parameter determines the length of time that a connection stays in the TIME_WAIT state when being closed. While a connection is in the TIME_WAIT state, the socket pair cannot be reused. This is also known as the 2MSL state because the value should be twice the maximum segment lifetime on the network. See RFC 793 for further details.
위의 레지스트리 값은 변경 후 재부팅해야 적용된다.
참고 문서
Microsoft technical guide - Optimizing Network Performance
TCP/IP Configuration Parameters