tcp_tw_recycle参数详解

TCP: time wait bucket table overflow

void tcp_time_wait(struct sock *sk, int state, int timeo) {
    if (tcp_death_row.sysctl_tw_recycle && tp->rx_opt.ts_recent_stamp)
        recycle_ok = icsk->icsk_af_ops->remember_stamp(sk);

    if (tcp_death_row.tw_count < tcp_death_row.sysctl_max_tw_buckets)
        tw = inet_twsk_alloc(sk, state);

    if (tw != NULL) {
        ...
    } else {
        LIMIT_NETDEBUG(KERN_INFO "TCP: time wait bucket table overflow\n");
    }

    tcp_update_metrics(sk);
    tcp_done(sk);
}

tcp_tw_recycle - BOOLEAN
Enable fast recycling TIME-WAIT sockets. Default value is 0.

tcp_tw_recycle/tcp_timestamp 要一起同时设置了才有效

你可能感兴趣的:(tcp_tw_recycle参数详解)