En este nuevo post de mi serie sobre µTorrent en Linux, hablaré de los parametros de kernel que he modificado en mi maquina para intentar optimizar el tema de conexiones.
La verdad es que he cojido estos parametros de algun manual sobre como tunear un servidor para tener un buen rendimiento cuando asume muchas conexiones, lo cual deberia servir en nuestro caso.
Estas lineas se introducen en el fichero /etc/sysctl.conf y para cargarlas usamos el comando: sysctl -p. Ahi van los parametros, con comentarios:
# Enable fast recycling of TIME-WAIT sockets status net.ipv4.tcp_tw_recycle=1 # tcp_fin_timeout is the time to hold a socket in state # FIN-WAIT-2 when the socket is closed at the server. net.ipv4.tcp_fin_timeout=30 # One of the problems found in servers with many simultaneous TCP # connections is the large number of connections that are open but unused. # TCP has a keepalive function that probes these connections and # drops them after tcp_keepalive_time net.ipv4.tcp_keepalive_time=1800 # max OS send buffer size (wmem) and receive buffer size (rmem) # for queues on all protocols (8388608=8MB) net.core.wmem_max=8388608 net.core.rmem_max=8388608 # In addition, you should also use the following commands for send and receive # buffers. They specify three values: minimum size, initial size, and maximum # size. The third value must be the same as or less than the value of # wmem_max and rmem_max. net.ipv4.tcp_rmem = 4096 87380 8388608 net.ipv4.tcp_wmem = 4096 87380 8388608 # When the server is heavily loaded or has many clients with bad connections # with high latency, it can result in an increase in half-open connections. # This is very common for Web servers, especially when there are many dial-up # users. These half-open connections are stored in the backlog connections # queue. You should set this value to at least 4096 (the default is 1024). net.ipv4.tcp_max_syn_backlog=4096 # don't cache ssthresh from previous connection net.ipv4.tcp_no_metrics_save = 1
Lo cierto es que no tengo datos para comparar si va mejor asi, pero el caso es que a mi me va de fabula!


Recent Comments