Skip to content

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Oct 7, 2025

Backports the following commits to 9.2:

Today, we aimed for a page_size of around 250KB, but found that its 
value is highly sensitive to the number of columns loaded. For example,
in time-series queries: loading one keyword dimension and one metric
yields a page_size of 2509; two keywords result in 1684; no keywords
give 4923. This causes performance fluctuations in time-series queries.

Performance in time-series queries is sensitive to page_size because 
large pages can disable bulk loading and constant block optimizations,
while smaller pages incur more overhead. Additionally, the page_size
should be a multiple of the numeric block size of tsdb codec to maximize
these optimizations.

This change proposes using jumbo_size (defaulting to the larger of 
1/1000th of the heap or 1MB) to calculate page_size, then adjusting it
to be a multiple of 128 and capping it at 2048. Benchmarks show that
2048 is a good upper limit, balancing the overhead per page with the
benefits of bulk loading and constant blocks.
@dnhatn dnhatn added :StorageEngine/TSDB You know, for Metrics >non-issue auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:StorageEngine labels Oct 7, 2025
@elasticsearchmachine elasticsearchmachine merged commit 41d7ca9 into elastic:9.2 Oct 7, 2025
34 checks passed
@dnhatn dnhatn deleted the backport/9.2/pr-136003 branch October 7, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >non-issue :StorageEngine/TSDB You know, for Metrics Team:StorageEngine v9.2.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants