Skip to content

Commit 0ddc09e

Browse files
committed
docs: document new system relation columns
1 parent a13253c commit 0ddc09e

File tree

3 files changed

+61
-31
lines changed

3 files changed

+61
-31
lines changed

doc/user/content/sql/system-catalog/mz_internal.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,15 @@ for all processes of all extant cluster replicas.
162162
At this time, we do not make any guarantees about the exactness or freshness of these numbers.
163163

164164
<!-- RELATION_SPEC mz_internal.mz_cluster_replica_metrics -->
165-
| Field | Type | Meaning |
166-
| ------------------- | ------------ | -------- |
167-
| `replica_id` | [`text`] | The ID of a cluster replica. |
168-
| `process_id` | [`uint8`] | The ID of a process within the replica. |
169-
| `cpu_nano_cores` | [`uint8`] | Approximate CPU usage, in billionths of a vCPU core. |
170-
| `memory_bytes` | [`uint8`] | Approximate RAM usage, in bytes. |
171-
| `disk_bytes` | [`uint8`] | Approximate disk usage in bytes. |
165+
| Field | Type | Meaning
166+
| ------------------- | ------------ | --------
167+
| `replica_id` | [`text`] | The ID of a cluster replica.
168+
| `process_id` | [`uint8`] | The ID of a process within the replica.
169+
| `cpu_nano_cores` | [`uint8`] | Approximate CPU usage, in billionths of a vCPU core.
170+
| `memory_bytes` | [`uint8`] | Approximate RAM usage, in bytes.
171+
| `disk_bytes` | [`uint8`] | Approximate disk usage, in bytes.
172+
| `heap_bytes` | [`uint8`] | Approximate heap (RAM + swap) usage, in bytes.
173+
| `heap_limit` | [`uint8`] | Available heap (RAM + swap) space, in bytes.
172174

173175
## `mz_cluster_replica_metrics_history`
174176

@@ -183,10 +185,12 @@ At this time, we do not make any guarantees about the exactness or freshness of
183185
| ---------------- | --------- | --------
184186
| `replica_id` | [`text`] | The ID of a cluster replica.
185187
| `process_id` | [`uint8`] | The ID of a process within the replica.
186-
| `cpu_nano_cores` | [`uint8`] | Approximate CPU usage in billionths of a vCPU core.
187-
| `memory_bytes` | [`uint8`] | Approximate memory usage in bytes.
188-
| `disk_bytes` | [`uint8`] | Approximate disk usage in bytes.
188+
| `cpu_nano_cores` | [`uint8`] | Approximate CPU usage, in billionths of a vCPU core.
189+
| `memory_bytes` | [`uint8`] | Approximate memory usage, in bytes.
190+
| `disk_bytes` | [`uint8`] | Approximate disk usage, in bytes.
189191
| `occurred_at` | [`timestamp with time zone`] | Wall-clock timestamp at which the event occurred.
192+
| `heap_bytes` | [`uint8`] | Approximate heap (RAM + swap) usage, in bytes.
193+
| `heap_limit` | [`uint8`] | Available heap (RAM + swap) space, in bytes.
190194

191195
## `mz_cluster_replica_statuses`
192196

@@ -225,13 +229,14 @@ for all processes of all extant cluster replicas, as a percentage of the total r
225229
At this time, we do not make any guarantees about the exactness or freshness of these numbers.
226230

227231
<!-- RELATION_SPEC mz_internal.mz_cluster_replica_utilization -->
228-
| Field | Type | Meaning |
229-
|------------------|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
230-
| `replica_id` | [`text`] | The ID of a cluster replica. |
231-
| `process_id` | [`uint8`] | The ID of a process within the replica. |
232-
| `cpu_percent` | [`double precision`] | Approximate CPU usage in percent of the total allocation. |
233-
| `memory_percent` | [`double precision`] | Approximate RAM usage in percent of the total allocation. |
234-
| `disk_percent` | [`double precision`] | Approximate disk usage in percent of the total allocation. |
232+
| Field | Type | Meaning
233+
|------------------|----------------------|---------
234+
| `replica_id` | [`text`] | The ID of a cluster replica.
235+
| `process_id` | [`uint8`] | The ID of a process within the replica.
236+
| `cpu_percent` | [`double precision`] | Approximate CPU usage, in percent of the total allocation.
237+
| `memory_percent` | [`double precision`] | Approximate RAM usage, in percent of the total allocation.
238+
| `disk_percent` | [`double precision`] | Approximate disk usage, in percent of the total allocation.
239+
| `heap_percent` | [`double precision`] | Approximate heap (RAM + swap) usage, in percent of the total allocation.
235240

236241
## `mz_cluster_replica_utilization_history`
237242

@@ -246,9 +251,10 @@ At this time, we do not make any guarantees about the exactness or freshness of
246251
|------------------|----------------------|--------
247252
| `replica_id` | [`text`] | The ID of a cluster replica.
248253
| `process_id` | [`uint8`] | The ID of a process within the replica.
249-
| `cpu_percent` | [`double precision`] | Approximate CPU usage in percent of the total allocation.
250-
| `memory_percent` | [`double precision`] | Approximate RAM usage in percent of the total allocation.
251-
| `disk_percent` | [`double precision`] | Approximate disk usage in percent of the total allocation.
254+
| `cpu_percent` | [`double precision`] | Approximate CPU usage, in percent of the total allocation.
255+
| `memory_percent` | [`double precision`] | Approximate RAM usage, in percent of the total allocation.
256+
| `disk_percent` | [`double precision`] | Approximate disk usage, in percent of the total allocation.
257+
| `heap_percent` | [`double precision`] | Approximate heap (RAM + swap) usage, in percent of the total allocation.
252258
| `occurred_at` | [`timestamp with time zone`] | Wall-clock timestamp at which the event occurred.
253259

254260
## `mz_cluster_replica_history`

src/catalog/src/builtin.rs

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4904,14 +4904,19 @@ pub static MZ_CLUSTER_REPLICA_METRICS_HISTORY: LazyLock<BuiltinSource> =
49044904
("process_id", "The ID of a process within the replica."),
49054905
(
49064906
"cpu_nano_cores",
4907-
"Approximate CPU usage in billionths of a vCPU core.",
4907+
"Approximate CPU usage, in billionths of a vCPU core.",
49084908
),
4909-
("memory_bytes", "Approximate memory usage in bytes."),
4910-
("disk_bytes", "Approximate disk usage in bytes."),
4909+
("memory_bytes", "Approximate memory usage, in bytes."),
4910+
("disk_bytes", "Approximate disk usage, in bytes."),
49114911
(
49124912
"occurred_at",
49134913
"Wall-clock timestamp at which the event occurred.",
49144914
),
4915+
(
4916+
"heap_bytes",
4917+
"Approximate heap (RAM + swap) usage, in bytes.",
4918+
),
4919+
("heap_limit", "Available heap (RAM + swap) space, in bytes."),
49154920
]),
49164921
is_retained_metrics_object: false,
49174922
access: vec![PUBLIC_SELECT],
@@ -4957,7 +4962,12 @@ pub static MZ_CLUSTER_REPLICA_METRICS: LazyLock<BuiltinView> = LazyLock::new(||
49574962
"Approximate CPU usage, in billionths of a vCPU core.",
49584963
),
49594964
("memory_bytes", "Approximate RAM usage, in bytes."),
4960-
("disk_bytes", "Approximate disk usage in bytes."),
4965+
("disk_bytes", "Approximate disk usage, in bytes."),
4966+
(
4967+
"heap_bytes",
4968+
"Approximate heap (RAM + swap) usage, in bytes.",
4969+
),
4970+
("heap_limit", "Available heap (RAM + swap) space, in bytes."),
49614971
]),
49624972
sql: "
49634973
SELECT
@@ -8874,15 +8884,19 @@ pub static MZ_CLUSTER_REPLICA_UTILIZATION: LazyLock<BuiltinView> = LazyLock::new
88748884
("process_id", "The ID of a process within the replica."),
88758885
(
88768886
"cpu_percent",
8877-
"Approximate CPU usage in percent of the total allocation.",
8887+
"Approximate CPU usage, in percent of the total allocation.",
88788888
),
88798889
(
88808890
"memory_percent",
8881-
"Approximate RAM usage in percent of the total allocation.",
8891+
"Approximate RAM usage, in percent of the total allocation.",
88828892
),
88838893
(
88848894
"disk_percent",
8885-
"Approximate disk usage in percent of the total allocation.",
8895+
"Approximate disk usage, in percent of the total allocation.",
8896+
),
8897+
(
8898+
"heap_percent",
8899+
"Approximate heap (RAM + swap) usage, in percent of the total allocation.",
88868900
),
88878901
]),
88888902
sql: "
@@ -8922,15 +8936,19 @@ pub static MZ_CLUSTER_REPLICA_UTILIZATION_HISTORY: LazyLock<BuiltinView> =
89228936
("process_id", "The ID of a process within the replica."),
89238937
(
89248938
"cpu_percent",
8925-
"Approximate CPU usage in percent of the total allocation.",
8939+
"Approximate CPU usage, in percent of the total allocation.",
89268940
),
89278941
(
89288942
"memory_percent",
8929-
"Approximate RAM usage in percent of the total allocation.",
8943+
"Approximate RAM usage, in percent of the total allocation.",
89308944
),
89318945
(
89328946
"disk_percent",
8933-
"Approximate disk usage in percent of the total allocation.",
8947+
"Approximate disk usage, in percent of the total allocation.",
8948+
),
8949+
(
8950+
"heap_percent",
8951+
"Approximate heap (RAM + swap) usage, in percent of the total allocation.",
89348952
),
89358953
(
89368954
"occurred_at",

test/sqllogictest/autogenerated/mz_internal.slt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object
118118
3 cpu_nano_cores uint8
119119
4 memory_bytes uint8
120120
5 disk_bytes uint8
121+
6 heap_bytes uint8
122+
7 heap_limit uint8
121123

122124
query ITT
123125
SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object = 'mz_cluster_replica_metrics_history' ORDER BY position
@@ -128,6 +130,8 @@ SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object
128130
4 memory_bytes uint8
129131
5 disk_bytes uint8
130132
6 occurred_at timestamp␠with␠time␠zone
133+
7 heap_bytes uint8
134+
8 heap_limit uint8
131135

132136
query ITT
133137
SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object = 'mz_cluster_replica_statuses' ORDER BY position
@@ -155,6 +159,7 @@ SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object
155159
3 cpu_percent double␠precision
156160
4 memory_percent double␠precision
157161
5 disk_percent double␠precision
162+
6 heap_percent double␠precision
158163

159164
query ITT
160165
SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object = 'mz_cluster_replica_utilization_history' ORDER BY position
@@ -164,7 +169,8 @@ SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object
164169
3 cpu_percent double␠precision
165170
4 memory_percent double␠precision
166171
5 disk_percent double␠precision
167-
6 occurred_at timestamp␠with␠time␠zone
172+
6 heap_percent double␠precision
173+
7 occurred_at timestamp␠with␠time␠zone
168174

169175
query ITT
170176
SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object = 'mz_cluster_replica_history' ORDER BY position

0 commit comments

Comments
 (0)