Skip to content

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

Merged
CalvinNeo merged 9 commits intoraftstore-proxy-6.5from
cp-limit-6.5
Feb 17, 2025
Merged

Limit proxy's memory from TiFlash's side (#408)#425
CalvinNeo merged 9 commits intoraftstore-proxy-6.5from
cp-limit-6.5

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 <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
a
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
a
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
a
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
a
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
@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 <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
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

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

@ti-chi-bot
Copy link

ti-chi-bot bot commented Feb 17, 2025

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

Details

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.

@ti-chi-bot
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.

Details 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