Skip to content

increase session index cache #8832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 12, 2025
Merged

Conversation

alexggh
Copy link
Contributor

@alexggh alexggh commented Jun 12, 2025

A 10 session index cache is not enough when you run under intense pressure and finality is lagg since you will end requesting the session index for blocks older than that. So let's make this cache larger to achieve its purpose even under intense load when it actually matters more to be faster.

The session_index_cache keeps a Hash and a u32, so that's about 36 bytes per entry, with this increase it can grow up to 65k which is not that big in my book.

Signed-off-by: Alexandru Gheorghe <[email protected]>
@AndreiEres AndreiEres self-requested a review June 12, 2025 08:09
@alexggh
Copy link
Contributor Author

alexggh commented Jun 12, 2025

/cmd prdoc --audience node_dev --bump patch

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/15612012923
Failed job name: fmt

Signed-off-by: Alexandru Gheorghe <[email protected]>
@alexggh alexggh added A4-backport-stable2503 Pull request must be backported to the stable2503 release branch A4-backport-stable2506 Pull request must be backported to the stable2506 release branch labels Jun 12, 2025
@alexggh alexggh enabled auto-merge June 12, 2025 14:31
@alexggh alexggh added this pull request to the merge queue Jun 12, 2025
Merged via the queue into master with commit cadf3ac Jun 12, 2025
330 of 384 checks passed
@alexggh alexggh deleted the alexggh/increase_session_index_cache branch June 12, 2025 16:12
@paritytech-release-backport-bot

Successfully created backport PR for stable2503:

paritytech-release-backport-bot bot pushed a commit that referenced this pull request Jun 12, 2025
A 10 session index cache is not enough when you run under intense
pressure and finality is lagg since you will end requesting the session
index for blocks older than that. So let's make this cache larger to
achieve its purpose even under intense load when it actually matters
more to be faster.

The session_index_cache keeps a Hash and a u32, so that's about 36 bytes
per entry, with this increase it can grow up to 65k which is not that
big in my book.

---------

Signed-off-by: Alexandru Gheorghe <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit cadf3ac)
paritytech-release-backport-bot bot pushed a commit that referenced this pull request Jun 12, 2025
A 10 session index cache is not enough when you run under intense
pressure and finality is lagg since you will end requesting the session
index for blocks older than that. So let's make this cache larger to
achieve its purpose even under intense load when it actually matters
more to be faster.

The session_index_cache keeps a Hash and a u32, so that's about 36 bytes
per entry, with this increase it can grow up to 65k which is not that
big in my book.

---------

Signed-off-by: Alexandru Gheorghe <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit cadf3ac)
@paritytech-release-backport-bot

Successfully created backport PR for stable2506:

EgorPopelyaev added a commit that referenced this pull request Jun 23, 2025
Backport #8832 into `stable2503` from alexggh.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Signed-off-by: Alexandru Gheorghe <[email protected]>
Co-authored-by: Alexandru Gheorghe <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Egor_P <[email protected]>
EgorPopelyaev added a commit that referenced this pull request Jun 26, 2025
Backport #8832 into `stable2506` from alexggh.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Signed-off-by: Alexandru Gheorghe <[email protected]>
Co-authored-by: Alexandru Gheorghe <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Egor_P <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A4-backport-stable2503 Pull request must be backported to the stable2503 release branch A4-backport-stable2506 Pull request must be backported to the stable2506 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants