Lost multicast packets: where to look
Find out whether gaps come from the NIC, the kernel or your application.
If a market data handler reports gaps while the feed itself is healthy, packets are being dropped on your host. UDP does not resend, so loss happens at one of three places: the network card, the kernel, or the application socket. Check each in turn.
1. Find the layer
- Network card (Linux):
netstat -i --udpand watch the RX-DRP column. - Kernel (Linux):
cat /proc/net/snmp | grep -w Udpand watch InErrors. - Socket (Linux): the same command, watching RcvbufErrors.
- Windows:
netstat -efor card discards andnetstat -s -p udpfor receive errors.
Run the Linux commands under watch -d. A counter that keeps rising shows where the loss is.
2. Tune that layer
- Card ring buffer: check with
ethtool -gand raise withethtool -G.rx 4096 - Kernel buffers: raise
net.core.rmem_max(for example to 67108864),net.ipv4.udp_memandnet.core.netdev_max_backlogwith sysctl, and persist them in /etc/sysctl.conf. - Socket buffer: in OnixS market data handlers set udpSocketBufferSize; 8388608 (8 MiB) is a good starting point. rmem_max must be at least as large or the setting has no effect.
- Application load: read the socket on a dedicated thread, pin it to its own core, and switch off unused network services and NICs.
3. Using OpenOnload
On Solarflare cards, check ethtool -S
and onload_stackdump lots for oflow_drop and memory_pressure. Raise EF_RXQ_SIZE or EF_MAX_PACKETS if they climb.
4. Isolate with a capture
Run tcpdump -n multicast -i
. If the capture is complete but the application still shows gaps, the loss is in the host stack or the application. If the capture has gaps too, look at the network or the card. OnixS Support can also send you the MulticastTest tool, which reads at socket level.
Documentation: Lost multicast packets troubleshooting on ref.onixs.biz
Try it: Request a free 30-day evaluation
Questions? Email sales@onixs.biz