Reduce UDP RcvbufErrors under high traffic bursts

Open
#523 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, linux

Research direction

The payload names no source files. Start by finding where the collector opens its UDP listening socket and check whether it sets a receive buffer size. Reproduce drops by watching the RcvbufErrors counter in /proc/net/snmp under a burst. The issue asks for an opinion before any change, so a first contribution would be a proposal: make SO_RCVBUF configurable, then discuss goroutine reads and recvmmsg separately. Done means the buffer size is settable and the drop counter can be verified.

Written by the indexing model from the issue text.

Description

enhancement

Under high traffic bursts, I consistently see the kernel UDP receive buffer error counter (RcvbufErrors) increase, indicating that datagrams are dropped even before they reach goflow2.

Make SO_RCVBUF configurable, so we can increase it if necessary.

I also thought about reading from the socket. Can it be done with more than 1 goroutine ? That could also help this problem. Another idea is to use batched reads via recvmmsg.

This problem only appeared in extremely high bursts of IPFIX data and all drops happened on the socket as goflow2 metrics for drops were 0. I would like your opinion on if these ideas could be helpful.

Dominant language
Go
Stars
817
Forks
182
Avg merge
4h 18m
Merged PRs (30d)
6

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from netsampler/goflow2

All issues in netsampler/goflow2

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.