[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tcp_fin_timeout



El mié, 22-08-2007 a las 14:45 -0400, Pablo Trujillo escribió:

> ¿cómo lo mides? (recuerda que el ping es icmp)
> ¿en un sistema completo (no embebido), te funciona como esperas?
> 
> bueno como decia al principio reviso con netstat si la conexion una
> ves terminada por un sistema remoto, continua en time wait --> este

ok, pero la conexión remota es tcp y no icmp ¿verdad? jeje

> valor por defecto es 60 y va decrementando, lei como hacerlo en un
> sistema no embebido y es con esta linea simple:  echo 10  >
> tcp_fin_timeout , y reiniciar la red , y listo funciona, pero aca no,

urmmmm

del manual de netstat:

       FIN_WAIT1
              The socket is closed, and the connection is shutting down.

       FIN_WAIT2
              Connection is closed, and the socket is waiting for a
shutdown from the remote end.

       TIME_WAIT
              The socket is waiting after close to handle packets still
in the network.




Y lo que dice la documentación del kernel sobre tcp_fin_timeout:



tcp_fin_timeout - INTEGER
        Time to hold socket in state FIN-WAIT-2, if it was closed
        by our side. Peer can be broken and never close its side,
        or even died unexpectedly. Default value is 60sec.
        Usual value used in 2.2 was 180 seconds, you may restore
        it, but remember that if your machine is even underloaded WEB
server,
        you risk to overflow memory with kilotons of dead sockets,
        FIN-WAIT-2 sockets are less dangerous than FIN-WAIT-1,
        because they eat maximum 1.5K of memory, but they tend
        to live longer. Cf. tcp_max_orphans.


Es decir, el fin_timeout es para si cierras tu la conexión, no el
sistema remoto. Según el man de netstat, deberías contar/ver ese tipo de
sockets con estado FIN_WAIT2 y no TIME_WAIT

Como consejo, revisa a fondo
fuentes-del-kernel/Documentation/networking/ip-sysctl.txt
que hay muchos más valores que te interesan.

En concreto los que empiezan por tp_tw  (time wait) aunque tdos los
demás no tienen desperdicio  ;)

> como sea sigo en busqueda de la respuesta.

A una mala te queda probar con tcp_max_tw_buckets, que se follará los
time-wait viejos, cuando la suma de todos llege al valor que le
indiques :)

> Saludos.
Saludos




Reply to: