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

Move TSC took-time policy to guard both heap and disk tier #17190

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

peteralfonsi
Copy link
Contributor

Description

Changes the TieredSpilloverCache's minimum took-time policy so that queries must take >10 ms to enter either tier, instead of just to enter the disk tier. This is desirable because when we allow caching size > 0 queries in the request cache, the number of cacheable queries may go way up, and we should avoid flooding the heap tier with overly cheap queries.

Note the setting key tiered_spillover.disk.store.policies.took_time.threshold is unchanged, for backwards compatibility.

Related Issues

Resolves #16162

Check List

  • Functionality includes testing.
  • [N/A] API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Peter Alfonsi <[email protected]>
@peteralfonsi peteralfonsi added backport PRs or issues specific to backporting features or enhancments and removed RFC Issues requesting major changes labels Jan 29, 2025
@peteralfonsi peteralfonsi added the backport 2.x Backport to 2.x branch label Jan 29, 2025
Copy link
Contributor

❌ Gradle check result for 36c7ba2: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Peter Alfonsi <[email protected]>
@github-actions github-actions bot added the RFC Issues requesting major changes label Jan 29, 2025
Copy link
Contributor

❌ Gradle check result for 0359de4: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

*/
private static final Setting.AffixSetting<TimeValue> TIERED_SPILLOVER_DISK_TOOK_TIME_THRESHOLD = Setting.suffixKeySetting(
private static final Setting.AffixSetting<TimeValue> TIERED_SPILLOVER_TOOK_TIME_THRESHOLD = Setting.suffixKeySetting(
Copy link
Contributor

@sgup432 sgup432 Feb 3, 2025

Choose a reason for hiding this comment

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

I think it would be better to introduce a new setting for overall Tiered cache rather than reusing existing one. As it would be very confusing to users/anyone seeing the setting name which otherwise works on both onHeap/disk tier.

We could eventually decide to deprecate this(disk policy setting) altogether later if needed.

Peter Alfonsi added 2 commits February 6, 2025 12:38
Copy link
Contributor

github-actions bot commented Feb 7, 2025

❌ Gradle check result for 294ebae: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments backport 2.x Backport to 2.x branch enhancement Enhancement or improvement to existing feature or request RFC Issues requesting major changes Search:Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Optimize caching policy for Request cache
2 participants