Skip to content

release-26.1: sql: increase page size when iterating over range descs#161797

Merged
yuzefovich merged 1 commit intocockroachdb:release-26.1from
yuzefovich:blathers/backport-release-26.1-161162
Jan 28, 2026
Merged

release-26.1: sql: increase page size when iterating over range descs#161797
yuzefovich merged 1 commit intocockroachdb:release-26.1from
yuzefovich:blathers/backport-release-26.1-161162

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

@yuzefovich yuzefovich commented Jan 26, 2026

Backport 1/1 commits from #161162 on behalf of @yuzefovich.


Empirical testing has showed that if we increase the page size when iterating over the range descriptors for
crdb_internal.ranges_no_leases, we get a minor performance improvement. Thus, this commit bumps the page size from 128 to 10k. Going higher didn't show any meaningful difference because the overhead of the virtual table generation dominated. (Testing was done on a single region cluster, so perhaps it could benefit from still higher page size in multi-region clusters, but I don't think it would matter much in practice still.)

Informs: #160196.
Epic: None
Release note: None


Release justification: low-risk improvement for large clusters.

Empirical testing has showed that if we increase the page size when
iterating over the range descriptors for
`crdb_internal.ranges_no_leases`, we get a minor performance
improvement. Thus, this commit bumps the page size from 128 to 10k.
Going higher didn't show any meaningful difference because the overhead
of the virtual table generation dominated. (Testing was done on a single
region cluster, so _perhaps_ it could benefit from still higher page
size in multi-region clusters, but I don't think it would matter much in
practice still.)

Release note: None
@yuzefovich yuzefovich requested a review from a team as a code owner January 26, 2026 15:51
@blathers-crl blathers-crl Bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Jan 26, 2026
@blathers-crl blathers-crl Bot requested a review from stevendanna January 26, 2026 15:51
@blathers-crl
Copy link
Copy Markdown

blathers-crl Bot commented Jan 26, 2026

Thanks for opening a backport.

Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate.

@blathers-crl blathers-crl Bot added backport Label PR's that are backports to older release branches T-sql-queries SQL Queries Team labels Jan 26, 2026
@blathers-crl
Copy link
Copy Markdown

blathers-crl Bot commented Jan 26, 2026

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@yuzefovich yuzefovich requested review from rafiss and removed request for stevendanna January 26, 2026 15:54
Copy link
Copy Markdown
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

i don't have too much context on usages of RangeDescIteratorFactory/NewLazyIterator, but based on my read of this and the linked issue, this seems safe to backport.

@yuzefovich
Copy link
Copy Markdown
Member Author

TFTR! We're simply increasing MaxSpanRequestKeys that is issued under the hood from 128 to 10k, and in my testing I have tried much larger values with no problem. For comparison, we use 100k value when we use limits for query scans (i.e. TableReader processor). Thus, the change should be effectively with no risk.

@yuzefovich yuzefovich merged commit 0c5fb4f into cockroachdb:release-26.1 Jan 28, 2026
18 checks passed
@yuzefovich yuzefovich deleted the blathers/backport-release-26.1-161162 branch January 28, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. T-sql-queries SQL Queries Team v26.1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants