Skip to content

fix(bench): RFC 0031 — raise Loki's internal gRPC cap (single-line inflation) - #478

Merged
jensholdgaard merged 2 commits into
mainfrom
rfc0031-grpc-msg-cap
Jul 11, 2026
Merged

fix(bench): RFC 0031 — raise Loki's internal gRPC cap (single-line inflation)#478
jensholdgaard merged 2 commits into
mainfrom
rfc0031-grpc-msg-cap

Conversation

@jensholdgaard

Copy link
Copy Markdown
Owner

What

Run #4 (29165198664) produced the decisive data point: it failed on the same ~5.27 MB internal message as runs #2/#3 despite the outer batch cap halving (3 MiB → 1.5 MB), with the payload fail-fast staying silent. Conclusion: a single kafka LogsData line's content alone inflates past Loki's stock 4 MiB internal gRPC cap in the OTLP→logproto translation. No outer batching can split an indivisible unit.

Fix

Add -server.grpc-server-max-recv/send-msg-size=16 MiB to the indicative run's documented ingest-side flags. This is the honest option:

  • Standard operator tuning, in Loki's favour (it lets Loki accept the data at all) — consistent with the anti-strawman direction of the existing flags.
  • Preserves the identical-ingest precondition the equivalence check requires; the alternative (skipping un-pushable lines) would silently unequalize the two corpora.

The 1.5 MB outer cap and the payload fail-fast stay — they're correct client behaviour regardless.

The three-run diagnosis chain

#2: count-capped 500-line batch encoded >4 MiB → byte cap. #3: same internal size at ≤3 MiB outer, fail-fast silent → inflation, not our payload. #4: same internal size at ≤1.5 MB outer → a single indivisible line, not uniform inflation. Each guard added along the way is what made the next diagnosis unambiguous.

After merge

Re-dispatch → run #5. The mega-line region should now clear; beyond it lies the untested back half of the replay, at-scale equivalence, and the report.

🤖 Generated with Claude Code

#4)

Run #4 (29165198664) failed on the SAME ~5.27 MB internal message as
runs #2/#3 despite the outer cap halving (3 MiB → 1.5 MB), and the
fail-fast stayed silent — decisive: a single kafka LogsData line's
content alone inflates past Loki's stock 4 MiB internal gRPC cap. No
outer batching can split an indivisible unit.

Add -server.grpc-server-max-recv/send-msg-size=16 MiB to the indicative
run's documented ingest-side flags (standard operator tuning, in Loki's
favour — it lets Loki accept the data at all). This preserves the
identical-ingest precondition the equivalence check requires; skipping
the line would silently unequalize the two corpora.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jensholdgaard
jensholdgaard requested a review from Copilot July 11, 2026 19:43
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: da0a7ebe-1b50-452e-b6cd-4e0820cebf44

📥 Commits

Reviewing files that changed from the base of the PR and between e6a4352 and a9caffa.

📒 Files selected for processing (1)
  • crates/ourios-bench/tests/rfc0031_comparative.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0031-grpc-msg-cap

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the RFC 0031 comparative Loki benchmark harness to document and apply an increased internal Loki gRPC message-size limit, addressing failures caused by a single indivisible LogsData line inflating beyond Loki’s default 4 MiB internal cap during OTLP→logproto translation.

Changes:

  • Adds Loki CLI flags intended to raise the internal gRPC max receive/send message sizes to 16 MiB for the indicative comparative run.
  • Documents the multi-run diagnosis rationale inline next to the Loki container flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/ourios-bench/tests/rfc0031_comparative.rs Outdated
Comment thread crates/ourios-bench/tests/rfc0031_comparative.rs Outdated
Copilot caught that the flags are -server.grpc-max-recv/send-msg-size-
bytes (dskit's server registry, defaults exactly the 4 MiB we hit), not
-server.grpc-server-max-*. The wrong names would have failed Loki's
startup and burned run #5. Verified against dskit source. Also backtick
the kafka service name in the comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@jensholdgaard
jensholdgaard merged commit 6604b0c into main Jul 11, 2026
26 checks passed
@jensholdgaard
jensholdgaard deleted the rfc0031-grpc-msg-cap branch July 11, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants