1752319 Members
6240 Online
108786 Solutions
New Discussion

FIN_WAIT_2

 
Nbeye
Frequent Visitor

FIN_WAIT_2

Hello

Sorry for my ENGLISH

My servers  TTFB (time to first byte) is so slow. So I want tuning my OS. I checked TCP connection states :

                                                                                                                                           
# netstat -an | grep  FIN_WAIT_2 |wc -l                                                                                                       
581                                                                                                                                           
# netstat -an | grep  ESTABLISHED |wc -l                                                                                                      
108                                                                                                                                           
# netstat -an | grep  FIN_WAIT_1 |wc -l                                                                                                       
0                                                                                                                                             
# netstat -an | grep  TIME_WAIT |wc -l                                                                                                        
63

 After  I checked    network TCP statistic  using netstat -s

tcp:                                                                                                                                          
        2868640068 packets sent                                                                                                               
                2078552380 data packets (2129803775735 bytes)                                                                                 
                2353614 data packets (2648175685 bytes) retransmitted                                                                         
                687746533 ack-only packets (166397695 delayed)                                                                                
                0 URG only packets                                                                                                            
                718191 window probe packets                                                                                                   
                2282086 window update packets                                                                                                 
                102342253 control packets                                                                                                     
        2858485493 packets received                                                                                                           
                1129519799 acks (for 2129768520155 bytes)                                                                                     
                10175391 duplicate acks                                                                                                       
                0 acks for unsent data                                                                                                        
                1857162700 packets (2652760502304 bytes) received in-sequence                                                                 
                0 completely duplicate packets (0 bytes)                                                                                      
                918 packets with some dup data (1212427 bytes duped)                                                                          
                1281124 out of order packets (2093417358 bytes)                                                                               
                0 packets (0 bytes) of data after window                                                                                      
                174885 window probes                                                                                                          
                103083764 window update packets                                                                                               
                2379739 packets received after close                                                                                          
                0 segments discarded for bad checksum                                                                                         
                0 bad TCP segments dropped due to state change                                                                                
        3800683 connection requests                                                                                                           
        34853750 connection accepts                                                                                                           
        38654433 connections established (including accepts)                                                                                  
        39058582 connections closed (including 404257 drops)                                                                                  
        254697 embryonic connections dropped                                                                                                  
        1072540096 segments updated rtt (of 1072540096 attempts)                                                                              
        420890 retransmit timeouts                                                                                                            
                7197 connections dropped by rexmit timeout                                                                                    
        718191 persist timeouts                                                                                                               
        16520892 keepalive timeouts                                                                                                           
                16493808 keepalive probes sent                                                                                                
                14491 connections dropped by keepalive                                                                                        
        0 connect requests dropped due to full queue                                                                                          
        3753439 connect requests dropped due to no listener

 What do you think about this results ?  Need to change some options ? such as tcp_kepalive,  tcp_fin_wait_2_timeout 

Thanks