Linux

Linux 路由記憶體顯示高 RTT 用於環回 - 這正常嗎?

  • September 17, 2011

以下是來自三個不同伺服器的部分路由記憶體,它們不是處於高負載狀態。

# ip route show cache | grep -B 1 rtt

local 127.0.0.1 from 127.0.0.1 dev lo 
   cache <local>  mtu 16436 rtt 106ms rttvar 155ms cwnd 7 advmss 16396 hoplimit 64
...
local 127.0.0.1 from 127.0.0.1 dev lo 
   cache <local>  mtu 16436 rtt 145ms rttvar 130ms cwnd 6 advmss 16396 hoplimit 64
...
local 127.0.0.1 from 127.0.0.1 dev lo 
   cache <local>  mtu 16436 rtt 172ms rttvar 205ms cwnd 5 advmss 16396 hoplimit 64

為什麼 rtt 可能如此之高且如此嘈雜(rttvar 也很高)?我如何解釋這些值?

RTT 低於 200 毫秒 (TCP_RTO_MIN) 的值是沒有意義的。rttvar 低於 250 毫秒的值是沒有意義的(因為對方可能沒有足夠準確的計時器)。RTT/RTTVAR 測量與這種快速介面無關。

來自include/net/tcp.h

#define TCP_RTO_MIN     ((unsigned)(HZ/5))

來自net/ipv4/tcp_input.c

    * 1. If rtt variance happened to be less 50msec, it is hallucination.
    *    It cannot be less due to utterly erratic ACK generation made
    *    at least by solaris and freebsd.

引用自:https://serverfault.com/questions/235185