There are too many TIME_WAIT states of tcp, resulting in a long response time

background introduction

        In order to find out the performance of the project, performance testing is required. After some research, I decided to use the distributed jmeter based on Tencent Cloud TKE for pressure testing. The advantage is that jmeter-suite is available and the environment is convenient to build; containerized deployment can easily increase pods to increase pressure.

       However, when the actual pressure was applied, it was found that the request volume could not increase, and the pressure test effect could not be achieved. After positioning, it is found that there are a large number of TIME_WAIT on the container pod, and the connection actually transferring data is much smaller than the set number of concurrent threads:

netstat -n | awk '/^tcp/ {++state[$NF]} END {for(key in state) print key,"\t",state[key]}'

 

Why there is TIME_WAIT

Guess you like

Origin blog.csdn.net/weixin_42550871/article/details/120672977