Reputation: 291
when I make performance testing with jmeter,the client reports the error"the request can not reach",I google the error,most of the answers refer to the "net.ipv4.tcp_tw_reuse",set it to 1,but someone say ,if wanna makie it work,must work with "net.ipv4.tcp_timestamps ",set "net.ipv4.tcp_timestamps " to 1 in server.I do not know why in client ,I set “net.ipv4.tcp_tw_reuse”,and must set "net.ipv4.tcp_timestamps" in server ,and it will work?who can help me ?any relation between the two kernel settings?
Upvotes: 0
Views: 3153
Reputation: 1172
I accidentally came accross this questions, so I will try to provide a short answer with my subsequential findings.
More information can be found here, but the main part is
TCP_TW_REUSE
This allows reusing sockets in TIME_WAIT state for new connections when it is safe from protocol viewpoint. Default value is 0 (disabled). It is generally a safer alternative to tcp_tw_recycle
/proc/sys/net/ipv4/tcp_timestamps - Timestamps (RFC 1323) add 12 bytes to the TCP header...
TIME_WAIT is the state of a TCP connection when the local end has been closed, but the OS waits for new packets from the other end (in case they arrive). After some time the connection is automatically freed.
The idea of adding the timestamps is to be able to calculate very accurate RTT (round trip time) that is used for congestion control.
Upvotes: 0
Reputation: 291
anyone knows about it,I make test about the two arguments,the "net.ipv4.tcp_timestamps" really make an affect on “net.ipv4.tcp_tw_reuse”,if I just set “net.ipv4.tcp_tw_reuse” to 1,the problem will not be solved,but when I also set "net.ipv4.tcp_timestamps" to 1 ,it will have an effect apparantly.who knows the relations between the two parameters?
Upvotes: 1