Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alexpyattaev
Copy link

@alexpyattaev alexpyattaev commented Nov 26, 2025

Problem

Unstaked TPS quota is cut away from staked under assumption that unstaked connections consume 100% of their allocated bandwidth at all times. This is generally not happening based on MNB data. Thus, the bandwidth allocation is overkill, preventing us from admitting more staked traffic.

Summary of Changes

  • Disconnects the unstaked from the TPS calculation of the staked connections.
  • Right now, the unstaked TPS allocation is computed as 20% of the total TPS allowed for all connections, and per-unstaked-connection TPS is capped based on the assumption that all unstaked slots are taken and used at 100% utilization. Decoupling unstaked connections from staked makes configuration simpler - user just needs to specify how many should be supported via max_unstaked_connections parameter.
  • This change fixes unstaked connection TPS at 200 irrespective of the connection table size to decouple their bandwidth from the staked TPS tunables. This matches current defaults but is more clear to the reader.

This is on top of #9277

/// Max TPS allowed for unstaked connection
const MAX_UNSTAKED_TPS: u64 = 200;
/// Expected % of max TPS to be consumed by unstaked connections
const EXPECTED_UNSTAKED_STREAMS_PERCENT: u64 = 20;

Choose a reason for hiding this comment

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

why rename this?

Copy link
Author

Choose a reason for hiding this comment

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

Because we are changing its semantics here. It only reduces the TPS allocation for staked connection table (removing 20% from their quota).

@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.6%. Comparing base (995b56a) to head (e382353).

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #9288     +/-   ##
=========================================
- Coverage    82.6%    82.6%   -0.1%     
=========================================
  Files         892      892             
  Lines      321056   321054      -2     
=========================================
- Hits       265387   265371     -16     
- Misses      55669    55683     +14     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KirillLykov
Copy link

looks good as a first step

@alexpyattaev alexpyattaev marked this pull request as ready for review November 26, 2025 09:00
@alexpyattaev alexpyattaev added this pull request to the merge queue Nov 26, 2025
Merged via the queue into anza-xyz:master with commit 8303e4b Nov 26, 2025
47 checks passed
@alexpyattaev alexpyattaev deleted the decople_unstaked_tps branch November 26, 2025 09:26
@alexpyattaev alexpyattaev added the v3.1 Backport to v3.1 branch label Nov 26, 2025
@mergify
Copy link

mergify bot commented Nov 26, 2025

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

mergify bot pushed a commit that referenced this pull request Nov 26, 2025
decouple unstaked node TPS from overall staked TPS limit

(cherry picked from commit 8303e4b)
alexpyattaev added a commit that referenced this pull request Nov 26, 2025
Decople unstaked tps (#9288)

decouple unstaked node TPS from overall staked TPS limit

(cherry picked from commit 8303e4b)

Co-authored-by: Alex Pyattaev <[email protected]>
AvhiMaz pushed a commit to AvhiMaz/agave that referenced this pull request Nov 28, 2025
decouple unstaked node TPS from overall staked TPS limit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3.1 Backport to v3.1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants