Skip to content

[Enhancement] Adjust calculation method for page cache mem usage metrics (backport #37740) #38339

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 1 commit into from
Jan 3, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 3, 2024

This is an automatic backport of pull request #37740 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

Why I'm doing: The memory usage of the page cache tracked by MemTracker may exceed the maximum available memory of the page cache. This could be problematic for users. ![image](https://github.com/StarRocks/starrocks/assets/45813655/b378ce53-c4b2-4b88-937f-cf77c115215b)

What I'm doing:
Make the size tracked by the memory allocator as the size occupied in the page cache. The new strategy results in starrocks_be_storage_page_cache_mem_bytes being slightly larger than starrocks_be_page_cache_capacity, as starrocks_be_page_cache_capacity does not include the metadata of the page cache itself.
image

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

…ics (#37740)

Signed-off-by: Zaorang Yang <[email protected]>
(cherry picked from commit 65b0fa9)
Copy link

github-actions bot commented Jan 3, 2024

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

github-actions bot commented Jan 3, 2024

[BE Incremental Coverage Report]

pass : 11 / 11 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 src/util/lru_cache.cpp 9 9 100.00% []
🔵 src/storage/page_cache.cpp 2 2 100.00% []

@wanpengfei-git wanpengfei-git merged commit 5b4fc2e into branch-3.1 Jan 3, 2024
@wanpengfei-git wanpengfei-git deleted the mergify/bp/branch-3.1/pr-37740 branch January 3, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants