Skip to content

In-memory Engine: optimize auto evict to reduce latency spike (#18130)#18228

Merged
ti-chi-bot[bot] merged 8 commits intotikv:release-8.5from
ti-chi-bot:cherry-pick-18130-to-release-8.5
Apr 1, 2025
Merged

In-memory Engine: optimize auto evict to reduce latency spike (#18130)#18228
ti-chi-bot[bot] merged 8 commits intotikv:release-8.5from
ti-chi-bot:cherry-pick-18130-to-release-8.5

Conversation

@ti-chi-bot
Copy link
Member

@ti-chi-bot ti-chi-bot commented Feb 18, 2025

This is an automated cherry-pick of #18130

What is changed and how it works?

Issue Number: Close #18093

What's Changed:

Tested with read-only workload.

Left: This PR
Right: nightly 2025-01-13

image
Optimize auto evict to minimize coprocessor request latency by avoiding
periodic eviction and loading of regions with high MVCC amplification.

* Do not evict cached regions when memory has not reached the
  `stop-load-threshold`.
* Replace MVCC amplification-based auto evict strategy with a simple
  moving average of coprocessor requests. This is because
  `RegionWriteCfCopDetail` only reflects MVCC amplification in IME,
  not in RocksDB, making low MVCC amplification a poor indicator for eviction.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Release note

Optimize auto evict to minimize coprocessor request latency by avoiding periodic eviction and loading of regions with high MVCC amplification.

Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
@ti-chi-bot ti-chi-bot added dco-signoff: yes Indicates the PR's author has signed the dco. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Feb 18, 2025
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Mar 4, 2025
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 26, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Mar 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LykxSassinator, overvenus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [LykxSassinator,overvenus]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Mar 26, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-03-04 03:22:21.343530871 +0000 UTC m=+325454.472450615: ☑️ agreed by LykxSassinator.
  • 2025-03-26 08:01:15.578168218 +0000 UTC m=+1033769.262404315: ☑️ agreed by overvenus.

@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Apr 1, 2025
@ti-chi-bot ti-chi-bot bot merged commit fcd8410 into tikv:release-8.5 Apr 1, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants