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

Storages: Track memory for PageDirectory #9134

Merged
merged 18 commits into from
Jun 13, 2024

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Jun 7, 2024

What problem does this PR solve?

Issue Number: close #8835

Problem Summary:

What is changed and how it works?

Add metrics for the memory allocated for UniversalPageId and EntryOrDelete


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

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 7, 2024
f
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
a
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@CalvinNeo
Copy link
Member Author

CalvinNeo commented Jun 11, 2024

image

===> After review, change to following

image

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
a
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Copy link
Contributor

@Lloyd-Pottiger Lloyd-Pottiger 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 ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 11, 2024
CalvinNeo and others added 2 commits June 11, 2024 20:37
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@CalvinNeo
Copy link
Member Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 11, 2024
@CalvinNeo
Copy link
Member Author

/retest

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 12, 2024
a
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>

namespace DB::PS
{
struct PageStorageMemorySummary
Copy link
Contributor

Choose a reason for hiding this comment

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

Names here are little verbose.

  • The name PageStorageMemorySummary has a slightly duplicated with the namespace PS.

  • The prefix mem_sum_ of mem_sum_uni_page_ids and mem_sum_versioned_entry_or_delete are duplicated with the struct name PageStorageMemorySummary. I suggest changing these names to:

    • mem_sum_uni_page_ids => uni_page_id_bytes.
    • mem_sum_versioned_entry_or_delete => versioned_entry_or_delete_bytes.
    • num_versioned_entry_or_delete => versioned_entry_or_delete_count.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

f
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@CalvinNeo CalvinNeo requested a review from JinheLin June 13, 2024 08:04
dbms/src/Storages/KVStore/FFI/SSTReader.h Outdated Show resolved Hide resolved
dbms/src/Common/TiFlashMetrics.h Outdated Show resolved Hide resolved
CalvinNeo and others added 3 commits June 13, 2024 16:54
Co-authored-by: JaySon <tshent@qq.com>
Co-authored-by: JaySon <tshent@qq.com>
Copy link
Contributor

@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.

Also update the grafana panel JSON?

Rest LGTM

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 13, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 13, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-11 09:39:41.713743811 +0000 UTC m=+457535.767055734: ☑️ agreed by Lloyd-Pottiger.
  • 2024-06-13 09:22:55.693801303 +0000 UTC m=+629329.747113229: ☑️ agreed by JaySon-Huang.

Copy link
Contributor

ti-chi-bot bot commented Jun 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, JinheLin, Lloyd-Pottiger

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JaySon-Huang,JinheLin,Lloyd-Pottiger]

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

f
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
f
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
a
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 13, 2024
@CalvinNeo
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 13, 2024
@CalvinNeo
Copy link
Member Author

Also update the grafana panel JSON?

Rest LGTM

updated

@CalvinNeo
Copy link
Member Author

/test

Copy link
Contributor

ti-chi-bot bot commented Jun 13, 2024

@CalvinNeo: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

  • /test pull-integration-test
  • /test pull-unit-test

Use /test all to run all jobs.

In response to this:

/test

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/test-infra repository.

@ti-chi-bot ti-chi-bot bot merged commit c1f8bca into pingcap:master Jun 13, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support thread-wise memory alloc/dealloc monitor
5 participants