lost and found ( for me ? )

CentOS 6.7 : ethtool “rx_discards” errors

Here is a memo about “rx_discards” error.

Reference
http://wiki.centos.org/Events/Dojo/Bangalore2014
(Topic: Network Debugging -> Slides: Network-jkalliyat.pdf )

# cat /etc/centos-release
CentOS release 6.7 (Final)

# uname -ri
2.6.32-573.3.1.el6.x86_64 x86_64

I found a number of “rx_discards” is counting up on one of interfaces, which processes approximately 300,000 UDP packet / sec.

In my case, I was able to solve that by increasing buffers on that interface.

rx_discards errors on interface ‘eth0’
# while :; do ethtool -S eth0 | grep discard ; sleep 1; done     
tx_discards: 0
    rx_discards: 49070
    tx_discards: 0
    rx_discards: 49071

Red line: current setting
# ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX:             2047
RX Mini:        0
RX Jumbo:       0
TX:             511
Current hardware settings:
RX:             200
RX Mini:        0
RX Jumbo:       0
TX:             511

Increase RX buffers to 2047 from 200
# ethtool -G eth0 rx 2047

After increasing buffers.
# ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX:             2047
RX Mini:        0
RX Jumbo:       0
TX:             511
Current hardware settings:
RX:             2047
RX Mini:        0
RX Jumbo:       0
TX:             511

Here are my kernel parameters.
sysctl -w net.ipv4.tcp_rmem="4096 873800 4194304"
sysctl -w net.ipv4.tcp_wmem="4096 873800 4194304"
sysctl -w net.ipv4.tcp_mem="5194304 5194304 5194304"
sysctl -w net.core.rmem_default=4194304
sysctl -w net.core.wmem_default=4194304
sysctl -w net.core.rmem_max=4194304
sysctl -w net.core.wmem_max=4194304
sysctl -w net.core.optmem_max=20480
/sbin/ethtool -G eth0 rx 2047

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.