Skip to content

Limit proxy's memory from TiFlash's side (#408) #425

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

Merged
merged 9 commits into from
Feb 17, 2025

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Feb 13, 2025

cherry-pick #408 to 6.5

What is changed and how it works?

Issue Number: Close tiflash#9745

What's Changed:


Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Release note


@ti-chi-bot ti-chi-bot bot added the size/XL label Feb 13, 2025
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
a
Signed-off-by: Calvin Neo <[email protected]>
a
Signed-off-by: Calvin Neo <[email protected]>
a
Signed-off-by: Calvin Neo <[email protected]>
a
Signed-off-by: Calvin Neo <[email protected]>
@CalvinNeo
Copy link
Member Author

CalvinNeo commented Feb 14, 2025

https://github.com/tikv/tikv/blob/be2db779d363d7be584e8077f7c4be9bbffb725d/components/raftstore/src/store/config.rs#L434

No idea why the default value of evict_cache_on_memory_ratio in tiflash-proxy is set to 0.0.

Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
assert_eq!(config.raft_store.evict_cache_on_memory_ratio, 0.1);
assert_eq!(config.memory_usage_high_water, 0.9);
// Seems #244 doesn't goes into this branch.
assert_eq!(config.server.reject_messages_on_memory_ratio, 0.2);
Copy link
Member Author

Choose a reason for hiding this comment

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

Differ from master

@@ -396,7 +396,7 @@ impl Default for Config {
apply_yield_duration: ReadableDuration::millis(500),
apply_yield_write_size: ReadableSize::kb(32),
perf_level: PerfLevel::Uninitialized,
evict_cache_on_memory_ratio: 0.0,
evict_cache_on_memory_ratio: 0.1,
Copy link
Member Author

@CalvinNeo CalvinNeo Feb 17, 2025

Choose a reason for hiding this comment

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

It is currently in 0.1 in tikv release-6.5. We just modify here, so even if we merged upstream later, there is no difference.

Copy link
Collaborator

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Feb 17, 2025

@JaySon-Huang: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

ti-chi-bot bot commented Feb 17, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JaySon-Huang

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

Needs approval from an approver in each of these files:

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

@CalvinNeo CalvinNeo merged commit 912cae4 into raftstore-proxy-6.5 Feb 17, 2025
2 of 6 checks passed
@JaySon-Huang JaySon-Huang deleted the cp-limit-6.5 branch February 17, 2025 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants