Skip to content

Adaptive concurrency controller for ingestion and processing.#25641

Merged
nickvikeras merged 4 commits intomainfrom
nickv/controller
Mar 4, 2026
Merged

Adaptive concurrency controller for ingestion and processing.#25641
nickvikeras merged 4 commits intomainfrom
nickv/controller

Conversation

@nickvikeras
Copy link
Copy Markdown
Contributor

@nickvikeras nickvikeras commented Feb 27, 2026

Description

Adaptive concurrency controller for ingestion and processing.

The algorithm is a result of weeks of trial and error guided by lots of Claude Research queries. I tried to document where each of the ideas came from in the comments in the code.

It's working very well now.

Test plan

I've been testing by backfilling test bigtable clusters from genesis in mainnet and testnet.

Release Notes

  • Indexing Framework:

Processor concurrency (fanout) and ingestion concurrency (ingest_concurrency) now use adaptive concurrency control by default. Instead of a fixed number of workers, concurrency starts at 1 and scales automatically based on downstream channel backpressure — up to num_cpus for processors and up to 500 for ingestion.

Breaking changes:

  • Processor::FANOUT trait constant has been removed. Processor concurrency is now configured via the fanout field on ConcurrentConfig / SequentialConfig, which accepts a ConcurrencyConfig enum instead of usize.
  • ingest_concurrency in IngestionConfig changed from usize to ConcurrencyConfig.
  • A new processor_channel_size field controls the channel between the processor and downstream stage (defaults to num_cpus / 2). This channel previously sized itself from FANOUT + PIPELINE_BUFFER.

Migration: To preserve previous fixed-concurrency behavior, set fanout: Some(ConcurrencyConfig::Fixed { value: N }) or ingest_concurrency: ConcurrencyConfig::Fixed { value: N }. Otherwise, no changes are needed — the adaptive defaults should work well for most workloads.

@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env February 27, 2026 16:09 — with GitHub Actions Inactive
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sui-docs Ready Ready Preview, Comment Mar 3, 2026 9:08am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multisig-toolkit Ignored Ignored Preview Mar 3, 2026 9:08am
sui-kiosk Ignored Ignored Preview Mar 3, 2026 9:08am

Request Review

@nickvikeras nickvikeras requested a review from bmwill February 27, 2026 16:09
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env February 28, 2026 14:34 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env February 28, 2026 15:05 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 16:44 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 17:14 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 17:30 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 17:38 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 17:47 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 17:50 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 18:13 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 19:23 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 19:23 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 19:24 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 19:25 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 20:55 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 22:40 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 22:45 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 22:48 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 2, 2026 23:36 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 3, 2026 00:08 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 3, 2026 00:27 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 3, 2026 01:27 — with GitHub Actions Inactive
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env March 3, 2026 01:30 — with GitHub Actions Inactive
@nickvikeras nickvikeras marked this pull request as ready for review March 3, 2026 01:34
@nickvikeras nickvikeras requested a review from a team as a code owner March 3, 2026 01:34
@nickvikeras nickvikeras requested a review from amnn March 3, 2026 01:34
Copy link
Copy Markdown
Contributor

@wlmyng wlmyng left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the detailed commentary in stream.rs, and the thorough testing, prevents_stampede and triggers_decrease were helpful to review to understand the mechanisms

do we ever want to expose the formula constants (dead band, log10)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants