Skip to content

Conversation

@JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Jul 7, 2025

Manual cherry-pick #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

Pick to release-7.5

Signed-off-by: JaySon-Huang <tshent@qq.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/cherry-pick-not-approved release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 7, 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 add_wide_table_metrics_75 branch from 3694484 to 4f39fbe Compare July 7, 2025 16:36
@JaySon-Huang JaySon-Huang changed the title metrics: Enhance the o11y of TiFlash storage layer metrics: Enhance the o11y of TiFlash storage layer (release-7.5) Jul 7, 2025
Signed-off-by: JaySon-Huang <tshent@qq.com>
@JaySon-Huang
Copy link
Contributor Author

/test pull-unit-test

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jul 8, 2025
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
@JaySon-Huang
Copy link
Contributor Author

/test pull-integration-test

Signed-off-by: JaySon-Huang <tshent@qq.com>
@JaySon-Huang
Copy link
Contributor Author

/test pull-integration-test

@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-08 08:40:31.091008858 +0000 UTC m=+1989083.814187840: ☑️ agreed by Lloyd-Pottiger.
  • 2025-07-09 05:58:43.239832945 +0000 UTC m=+2065775.963011924: ☑️ agreed by JinheLin.

@ti-chi-bot ti-chi-bot bot merged commit bf1951c into pingcap:release-7.5 Jul 9, 2025
4 checks passed
@JaySon-Huang JaySon-Huang deleted the add_wide_table_metrics_75 branch July 9, 2025 07:01
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants