Skip to content
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

pageserver: decrease utilization MAX_SHARDS #10489

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

jcsp
Copy link
Collaborator

@jcsp jcsp commented Jan 23, 2025

Problem

The intent of this parameter is to have pageservers consider themselves "full" if they've got lots of shards, even if they have plenty of capacity. It works, but because we typically successfully oversubscribe capacity up to 200%, the MAX_SHARDS limit is effectively doubled, so this 20,000 value ends up meaning 40,000, whereas the original intent was to limit nodes to ~10000 shards.

Summary of changes

  • Change MAX_SHARDS to 5000, so that a node with 5000 will get a 100% utilization, which is equivalent in practice to being considered "half full" by the storage controller in capacity terms.

This is all a bit subtle and indiret. Originally the limit was baked into the pageserver with the idea that the pageserver knows better what its own resources tolerate than the storage controller does, but in practice it would be probably be easier to understand all this if we just did it controller-side. So there's scope to refactor here in future.

@jcsp jcsp requested a review from a team as a code owner January 23, 2025 14:17
@jcsp jcsp requested review from arssher and erikgrinaker January 23, 2025 14:17
@jcsp jcsp enabled auto-merge January 23, 2025 15:50
Copy link

github-actions bot commented Jan 23, 2025

7403 tests run: 7017 passed, 0 failed, 386 skipped (full report)


Flaky tests (3)

Postgres 17

Postgres 14

Code coverage* (full report)

  • functions: 33.5% (8495 of 25347 functions)
  • lines: 49.3% (71482 of 145075 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
a746fb1 at 2025-01-27T17:11:27.013Z :recycle:

@jcsp jcsp added this pull request to the merge queue Jan 27, 2025
Merged via the queue into main with commit aec92bf Jan 27, 2025
80 checks passed
@jcsp jcsp deleted the jcsp/pageserver-tweak-max-shards branch January 27, 2025 17:04
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.

3 participants