Default settings for NICs is good for most cases however there are times when you need to do some performance tuning.
When you start to observe increasing drops of RX packets it means that your system cannot process incoming packets fast enough. You can verify on your monitoring system to correlate this issue with increased network traffic at the same time.
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:22:19:50:ea:76
inet addr:192.168.x.x Bcast:192.168.x.x Mask:255.255.xxx.xxx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3208932 errors:0 dropped:19188 overruns:0 frame:0
TX packets:1543138 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
First verify current NIC settings:
# ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX: 1020
RX Mini: 0
RX Jumbo: 4080
TX: 255
Current hardware settings:
RX: 255
RX Mini: 0
RX Jumbo: 0
TX: 255
Increasing ring buffer for rx should fix this issue:
# ethtool -G eth0 rx 512
To have this settings persistent make sure you add this command to /etc/rc.local script.
10x.
ReplyDeletethat solved my problem
Glad I could help.
ReplyDeleteYou can also have a look at rx-usecs and rx-frame parameters (ethtool -c ethX) and tune them to reduce the frame count and time latency. It will keep CPU more busy but can also save frames from being dropped.
Well, I stumbled here by chance and this solved my issue. Many thanks and your site is now in my bookmarks ;)
ReplyDeletenote that you can use it as ethtool_opts in /etc/sysconfig/network-scripts/ifcfg-eth0 . The variable is in capitals.
ReplyDelete