title: what is the side effect of setting tcp_max_tw_buckets to a very small value?
body: <p>I know it is quite normal setting tcp_max_tw_buckets to a relatively small number such as 30000 or 50000, to avoid the situation when a host have a lots of time-wait state connections and application failed to open new one. It is something mentioned quite a lots. such as the question like this: <a href="https://serverfault.com/questions/212093/how-to-reduce-number-of-sockets-in-time-wait" title="How to reduce number of sockets in TIME_WAIT?">How to reduce number of sockets in TIME_WAIT?</a></p>
  
  <p>As before I know time-wait is a state to avoid TCP packets <a href="https://superuser.com/questions/173535/what-are-close-wait-and-time-wait-states">out of order</a>, and it may be better using <a href="https://vincent.bernat.im/en/blog/2014-tcp-time-wait-state-linux" rel="nofollow noreferrer" title="Coping with the TCP TIME-WAIT state on busy Linux servers">some other approach</a> to coping it. And if you setting it to a small number thing may went wrong.</p>
  
  <p>I feel I'm stucking at somewhere that I have to set tcp_max_tw_buckets to a small number, and don't know the specific scenarios I shall avoid it.</p>
  
  <p>So my question is what is the side effect of setting tcp_max_tw_buckets to a very small value, and can I setup a specific scenario using lab environment, that a small number of tcp_max_tw_buckets will cause the trouble?</p>