Jump to content
Калькуляторы

Проблема на интрефейсе в Linux eth0

# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:30:48:5a:f2:6f
          inet addr:192.168.10.1  Bcast:192.168.255.7  Mask:255.255.255.248
          inet6 addr: fe80::230:48ff:fe5a:f26f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2969654960 errors:0 dropped:172102 overruns:0 frame:0
          TX packets:772760058 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:4000
          RX bytes:533648381 (508.9 MiB)  TX bytes:3848901318 (3.5 GiB)
          Base address:0x6000 Memory:ed400000-ed420000

 

# ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX:             4096
RX Mini:        0
RX Jumbo:       0
TX:             4096
Current hardware settings:
RX:             1024
RX Mini:        0
RX Jumbo:       0
TX:             1024

 

Cpu0  :  0.1%us,  0.0%sy,  0.0%ni, 61.1%id,  0.1%wa,  8.5%hi, 30.1%si,  0.0%st
Cpu1  :  0.2%us,  0.1%sy,  0.0%ni, 98.7%id,  0.8%wa,  0.0%hi,  0.2%si,  0.0%st

 

как посмотреть более детально из-за чего дропы пакетов идут?

 

Share this post


Link to post
Share on other sites
ethtool -S eth0

netstat -s

На всякий случай, TX тоже проверять надо

tc -s qdisc show

 

# ethtool -S eth0
NIC statistics:
     rx_packets: 234262147207
     tx_packets: 235979084334
     rx_bytes: 164193382879966
     tx_bytes: 129982113205169
     rx_broadcast: 3031721
     tx_broadcast: 4250
     rx_multicast: 0
     tx_multicast: 6
     rx_errors: 0
     tx_errors: 0
     tx_dropped: 0
     multicast: 0
     collisions: 0
     rx_length_errors: 0
     rx_over_errors: 0
     rx_crc_errors: 0
     rx_frame_errors: 0
     rx_no_buffer_count: 11700820
     rx_missed_errors: 2930048
     tx_aborted_errors: 0
     tx_carrier_errors: 0
     tx_fifo_errors: 0
     tx_heartbeat_errors: 0
     tx_window_errors: 0
     tx_abort_late_coll: 0
     tx_deferred_ok: 0
     tx_single_coll_ok: 0
     tx_multi_coll_ok: 0
     tx_timeout_count: 0
     tx_restart_queue: 80004
     rx_long_length_errors: 0
     rx_short_length_errors: 0
     rx_align_errors: 0
     tx_tcp_seg_good: 1841
     tx_tcp_seg_failed: 0
     rx_flow_control_xon: 0
     rx_flow_control_xoff: 0
     tx_flow_control_xon: 0
     tx_flow_control_xoff: 0
     rx_long_byte_count: 164193382879966
     rx_csum_offload_good: 232556756524
     rx_csum_offload_errors: 21424807
     rx_header_split: 0
     alloc_rx_buff_failed: 0
     tx_smbus: 0
     rx_smbus: 3040041
     dropped_smbus: 0

 

Ip:
    1187991187 total packets received
    89278222 with invalid headers
    5376 with invalid addresses
    2472809580 forwarded
    3207 with unknown protocol
    0 incoming packets discarded
    2526898068 incoming packets delivered
    672891762 requests sent out
    1143 outgoing packets dropped
    2767018 fragments dropped after timeout
    731955318 reassemblies required
    350138269 packets reassembled ok
    5637962 packet reassembles failed
    25812221 fragments received ok
    417 fragments failed
    72833849 fragments created

Tcp:
    258821 active connections openings
    13806939 passive connection openings
    46344 failed connection attempts
    2124304 connection resets received
    6 connections established
    569277148 segments received
    522670647 segments send out
    1366938 segments retransmited
    8009837 bad segments received.
    473666086 resets sent
Udp:
    1913708 packets received
    1905362210 packets to unknown port received.
    193663 packet receive errors
    1917451 packets sent
UdpLite:
TcpExt:
    46203 resets received for embryonic SYN_RECV sockets
    29 packets pruned from receive queue because of socket buffer overrun
    155 ICMP packets dropped because they were out-of-window
    359063 TCP sockets finished time wait in fast timer
    25 time wait sockets recycled by time stamp
    240 packets rejects in established connections because of timestamp
    3256784 delayed acks sent
    148 delayed acks further delayed because of locked socket
    Quick ack mode was activated 24007 times
    1462 times the listen queue of a socket overflowed
    1462 SYNs to LISTEN sockets dropped
    1617069 packets directly queued to recvmsg prequeue.
    2872 bytes directly in process context from backlog
    756117 bytes directly received in process context from prequeue
    4099644 packet headers predicted
    84 packets header predicted and directly queued to user
    15936921 acknowledgments not containing data payload received
    3361077 predicted acknowledgments
    261 times recovered from packet loss by selective acknowledgements
    18 congestion windows recovered without slow start by DSACK
    6289 congestion windows recovered without slow start after partial ack
    105 TCP data loss events
    254 timeouts after reno fast retransmit
    2044 timeouts after SACK recovery
    60 timeouts in loss state
    801 fast retransmits
    25 forward retransmits
    212 retransmits in slow start
    332065 other TCP timeouts
    10 SACK retransmits failed
    7215 packets collapsed in receive queue due to low socket buffer
    23923 DSACKs sent for old packets
    13 DSACKs sent for out of order packets
    20964 DSACKs received
    9574596 connections reset due to unexpected data
    2076456 connections reset due to early user close
    3928 connections aborted due to timeout
    TCPDSACKIgnoredOld: 6720
    TCPDSACKIgnoredNoUndo: 5293
IpExt:
    InTruncatedPkts: 1
    InMcastPkts: 25594819
    OutMcastPkts: 8287570
    InBcastPkts: 62

 

шейпера нет.

Я так понимаю проблема похоже с переполнением буфера в TCP стеке? Если не так, поправте.

Share this post


Link to post
Share on other sites

ethtool -G eth0 rx 2048

а потом и 4096

 

Сервер не тянет, перегружен скорее всего или шейперными или правилами firewall. Или еще чем-то "ядерным".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this