Skip to content

Conversation

@ti-chi-bot
Copy link
Member

@ti-chi-bot ti-chi-bot commented Jul 8, 2025

This is an automated cherry-pick of #10275 and some metrics added by #10244

What problem does this PR solve?

Issue Number: close #10272

Problem Summary:

What is changed and how it works?

* Add metrics about
  * Number of keyspace, Storage instance, Segment instance, MemTable instance
  * Bytes of MemTable and allocated bytes of MemTable
* System table
  * Add `delta_cache_alloc_size` to `system.dt_segments`
  * Add `column_count`,`delta_cache_alloc_size` to `system.dt_tables`

New Grafana panels on TiFlash-Summary:

  • "Threads" - a copy of "Threads" from TiFlash-Proxy-Details. We can check whether specified thread request a large IO, etc
  • "Imbalanced read/write" - Check whether the CPU usage/read throughput/write throughput is imbalanced between different TiFlash instances
  • "Memory trace" - A summary status of objects in memory, check whether there are OOM risk. Number of tables, segments, memtable bytes, etc

With the "Memory trace" panel, we can get more insight about the issue #10253 (comment) that mem-table may take too much memory.
Image

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
* deploy a cluster with 2 tiflash
* load chbenchmark 1500
* run chbenchmark workload with 50 tp thread and 1 ap thread for 60 minutes
"tiup bench ch --host 10.2.12.81 -P 8020 --warehouses 1500 run -D chbenchmark -T 50 -t 1 --time 60m"
* collect the metrics below

image
image
image

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

Enhance the observability for TiFlash OOM risk under wide-column scenario

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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 Jul 8, 2025
@ti-chi-bot
Copy link
Member Author

@JaySon-Huang This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

@JaySon-Huang JaySon-Huang changed the title metrics: Enhance the o11y of TiFlash storage layer (#10275) metrics: Enhance the o11y of TiFlash storage layer (release-8.5) Jul 8, 2025
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
@JaySon-Huang JaySon-Huang force-pushed the cherry-pick-10275-to-release-8.5 branch from e95808b to 6c64923 Compare July 8, 2025 12:46
Signed-off-by: JaySon-Huang <tshent@qq.com>
@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 Jul 8, 2025
Signed-off-by: JaySon-Huang <tshent@qq.com>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 9, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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 [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

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 9, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 9, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-07-09 05:31:29.636280522 +0000 UTC m=+2064142.359459506: ☑️ agreed by Lloyd-Pottiger.
  • 2025-07-09 05:58:54.220498058 +0000 UTC m=+2065786.943677040: ☑️ agreed by JinheLin.

@JaySon-Huang
Copy link
Contributor

/unhold
conflict are resolved

@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 Jul 9, 2025
@ti-chi-bot ti-chi-bot bot merged commit acc106f into pingcap:release-8.5 Jul 9, 2025
4 checks passed
JaySon-Huang added a commit to ti-chi-bot/tiflash that referenced this pull request Jul 16, 2025
…gcap#10290)

close pingcap#10272

* Add metrics about
  * Number of keyspace, Storage instance, Segment instance, MemTable instance
  * Bytes of MemTable and allocated bytes of MemTable
* System table
  * Add `delta_cache_alloc_size` to `system.dt_segments`
  * Add `column_count`,`delta_cache_alloc_size` to `system.dt_tables`

Signed-off-by: JaySon-Huang <tshent@qq.com>

Co-authored-by: JaySon-Huang <tshent@qq.com>
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. 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.

4 participants