[Remote-write sink] 83,560 samples dropped 43 seconds after start when 5,000 poll: always devices all come due at once
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- backend, observability, performance
Research direction
Start with InterfaceSnapshotPoller.Registration and its nextWalkNanos initialization, then trace how the first sweep feeds the remote-write queue and produces metrics_sink_droppedSamples. Reproduce the devices-5000-pw128 benchmark using the steps and compare the journal, /metrics, and bench/RUNLOG.md evidence. Done means the 5,000-device startup sweep completes without dropped samples while steady-state behavior remains intact.
Written by the indexing model from the issue text.
Description
- Build / Version: ec65137f on branch
spec/snmp-metrics(unreleased SNMP metrics phase 1) - Device & OS: libvirt guest
riptide-snmp-bench, 4 vCPU, 16 GiB, Debian 13, Temurin 25.0.4.1 - Browser / Client: n/a, server process; agents are nl6 v0.32.0
cisco_catalyst_9500(48 interfaces, SNMPv2c); store is VictoriaMetrics v1.152.0 on the same LAN - Severity: Major, about 2.3 percent of the first sweep's samples are lost on every start or restart; workaround exists
- Priority: P2, bounded to start-up, but it fires on every restart at the spec's target fleet size
Preconditions
- 5,000 devices in the inventory, each a
/32agent entry with a v2c credential set and anexportersentry withpoll: always - Polling profile
refresh-interval=PT60S,collect[0]=if-mib-interfaces;riptide.snmp.poll.pool-width=128 - Remote-write sink at defaults:
batch.max-samples=5000,batch.max-latency=2s,queue-capacity=2000000; the store accepts every batch (204) and ingests 60,000 rows per second in steady state
Steps to reproduce
- Restart riptide with the inventory above.
- Watch
metrics_sink_droppedSampleson/metricsfor the first two minutes. - Read the riptide journal for the sink's warnings.
Expected result
No samples dropped: the first sweep of 5,000 devices produces 3.6 million samples that fit an interval of 60 seconds, and the store is far from saturated.
Actual result
metrics_sink_droppedSamples jumps to 83,560 at 12:25:01Z, 43 seconds after the 12:24:18Z restart, with one WARN Dropping samples (queue full because ...) from thread snmp-walk-io-94, and then stays flat for the rest of the run (0 further drops in 30 minutes; steady state 61,000 samples per second sent, 0 failed). snmp_poller_deferred stays at 0 per minute afterwards. The same restart with queue-capacity=4000000 (and a 30 second interval, 256 permits) dropped nothing.
Evidence
/metricssnapshots, the journal line and the store'svm_rows_inserted_totalrate recorded in the benchmark run log (session scratchpadbench/RUNLOG.md, stepdevices-5000-pw128), and the benchmark-capture artifactdevices-5000-pw128- Code observed in the same build:
InterfaceSnapshotPoller.RegistrationsetsnextWalkNanos = nowNanoson construction, so every inventory-registered device is due on the first tick; only re-walks are spread by the address-derived offset (nextWalkAt), so the first sweep runs as fast as the permits allow, about 40 seconds for 5,000 devices at 128 permits, offering about 90,000 samples per second to a queue that drains at the sink's flush rate
Workaround
Set riptide.metrics.remote-write.queue-capacity to at least one full sweep, devices times 720 samples (3,600,000 for 5,000 devices); 4,000,000 absorbed the burst in the same rig. The loss is confined to the first sweep after a start.
- Dominant language
- Java
- Stars
- 2
- Forks
- 0
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 52
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Riptide-Labs/riptide
-
enhancement priority: low
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Riptide-Labs/riptide#1060 ·
Maintainers usually reply within 1 day
-
enhancement priority: medium
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Riptide-Labs/riptide#1059 ·
Maintainers usually reply within 1 day
-
dependencies javascript priority: low
Difficulty 1/5 Under an hour Newbie friendliness 15/100
Riptide-Labs/riptide#1045 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 22/100
Riptide-Labs/riptide#987 ·
Maintainers usually reply within 1 day
-
enhancement priority: low
Difficulty 5/5 Over a week Newbie friendliness 25/100
Riptide-Labs/riptide#983 ·
Maintainers usually reply within 1 day
All issues in Riptide-Labs/riptide
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
commons-app/apps-android-commons#7275 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liberation-data/drivine4j#682 ·
Maintainers usually reply within 1 day
-
Document and enforce pull request review guidelinesPossibly taken @dashorst claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRubyOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
hermes-queue
Difficulty 1/5 Under an hour Newbie friendliness 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
Maintainers usually reply within 1 day