Pd-ctl store status statistics information

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: pd-ctl store status统计信息

| username: HoniiTro19

【 TiDB Version】v6.0.0
【Problem Encountered】
Querying each Store’s statistics through pd-ctl
tiup ctl:v6.0.0 pd store -u http://x.x.x.x:2379
Partial results returned
{
“count”: 9,
“stores”: [
{
“store”: {
“id”: 1,
“address”: “x.x.x.x:20160”,
“labels”: [
{
“key”: “region”,
“value”: “tikv6”
},
{
“key”: “zone”,
“value”: “zone2”
}
],
“version”: “6.0.0”,
“status_address”: “x.x.x.x:20180”,
“git_hash”: “2b4f7d57af9ca3e21bc07b91a9cfc466ed87734f”,
“start_timestamp”: 1662346275,
“deploy_path”: “/data/tidb-deploy/tikv-20160/bin”,
“last_heartbeat”: 1662346344534457624,
“state_name”: “Up”
},
“status”: {
“capacity”: “99.95GiB”,
“available”: “98.27GiB”,
“used_size”: “34.11MiB”,
“leader_count”: 12,
“leader_weight”: 1,
“leader_score”: 12,
“leader_size”: 12,
“region_count”: 19,
“region_weight”: 1,
“region_score”: 86.889711054348,
“region_size”: 19,
“slow_score”: 1,
“start_ts”: “2022-09-05T10:51:15+08:00”,
“last_heartbeat_ts”: “2022-09-05T10:52:24.534457624+08:00”,
“uptime”: “1m9.534457624s”
}
},
Are the metrics status.used_size and status.leader_count updated in real-time, and what exactly does status.used_size measure (is it sstable + metadata)?

| username: h5n1 | Original post link

Basically, it is real-time. The used_size is based on the estimated value of the region, not the exact value. The size of the region is also an approximate estimate.

| username: HoniiTro19 | Original post link

Is this estimated value deviation significant? Is there a way to reduce the deviation (for example, through analyze table)?

| username: HoniiTro19 | Original post link

Or where can I see the exact data volume?

| username: h5n1 | Original post link

Not much deviation.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.