You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CNS-136 changed the chart sample rate default from 0.1 to 0.99, matching
Cloud, and clarified that the sample rate is not what bounds how much
query history stores.
Update the documented defaults and invert the tuning guidance to match:
statement_logging_target_data_rate is the parameter that bounds storage
growth, so that is the one to lower on instances with limited storage.
Lowering the sample rate only reduces environmentd CPU overhead and
makes the history less representative, without lowering the ceiling.
CNS-139
`operator.args.statementLoggingMaxSampleRate` value to `0.1`, so roughly 10% of
33
-
statement executions are sampled.
34
-
35
-
This value is lower than `environmentd`'s own default of `0.99`. Statement
36
-
logging costs CPU on `environmentd` and storage for the retained history, and
37
-
that overhead is most noticeable on the small instances typical of self-managed
38
-
deployments, so the chart samples a fraction of statements instead.
31
+
The Materialize operator Helm chart sets
32
+
`operator.args.statementLoggingMaxSampleRate` to `0.99`, and leaves
33
+
`operator.args.statementLoggingTargetDataRate` unset so that `environmentd`'s
34
+
own default of 2071 bytes per second applies. Both are the values Materialize
35
+
Cloud runs at, so query history in a self-managed deployment behaves the same as
36
+
in Cloud out of the box.
39
37
40
38
The rate that actually applies to a statement is the smaller of two parameters:
41
39
@@ -47,17 +45,16 @@ The rate that actually applies to a statement is the smaller of two parameters:
47
45
Because the system parameter is a cap, lowering it reduces logging for every
48
46
session regardless of what individual sessions request.
49
47
50
-
Sampling is not the only limit. Materialize also throttles statement logging to
51
-
a sustained byte rate,`statement_logging_target_data_rate`, which defaults to
52
-
2071 bytes per second. Sampled executions beyond that budget are dropped, so a
53
-
sample rate of `1.0` does not guarantee that every statement is recorded. On
54
-
busy instances this byte rate, rather than the sample rate, is what actually
55
-
bounds how much history you collect.
48
+
Sampling is not the only limit, and it is not the one that bounds volume.
49
+
Materialize also throttles statement logging to a sustained byte rate,
50
+
`statement_logging_target_data_rate`, and drops sampled executions that would
51
+
exceed it. So a sample rate of `1.0` does not guarantee every statement is
52
+
recorded, and on a busy instance the byte rate is what determines how much
53
+
history you actually accumulate.
56
54
57
55
{{< note >}}
58
-
Unlike Materialize Cloud, self-managed deployments log statements issued by the
59
-
`mz_system` user by default, because the chart enables
60
-
`enableInternalStatementLogging`. Internal activity, including the Console's own
56
+
The chart also enables `enableInternalStatementLogging`, so statements issued by
57
+
the `mz_system` user are logged. Internal activity, including the Console's own
61
58
catalog queries, is sampled alongside your workload and counts toward the cost
62
59
described below.
63
60
{{< /note >}}
@@ -68,43 +65,45 @@ Two parameters bound how much query history you collect:
68
65
69
66
| Parameter | Chart value | Bounds |
70
67
|-----------|-------------|--------|
71
-
|`statement_logging_max_sample_rate`|`operator.args.statementLoggingMaxSampleRate` (`0.1`) | The fraction of executions considered for logging. |
72
-
|`statement_logging_target_data_rate`|`operator.args.statementLoggingTargetDataRate` (unset) | The sustained bytes per second written, 2071 by default. |
68
+
|`statement_logging_max_sample_rate`|`operator.args.statementLoggingMaxSampleRate` (`0.99`) | The fraction of executions considered for logging. |
69
+
|`statement_logging_target_data_rate`|`operator.args.statementLoggingTargetDataRate` (unset, so 2071) | The sustained bytes per second written. Must be greater than 0. |
73
70
74
-
Raise the sample rate for more representative history. Lower the data rate to
75
-
hold storage growth down. Each can be set either through the Helm chart or as a
76
-
system parameter, and those two paths interact, so read the note on precedence
77
-
below before picking one.
71
+
The two are not interchangeable. Lower the data rate to hold storage growth
72
+
down. Lowering the sample rate instead makes query history less representative
73
+
without lowering the ceiling on what statement logging stores, because the byte
74
+
rate is already the binding limit. Each can be set either through the Helm chart
75
+
or as a system parameter, and those two paths interact, so read the note on
76
+
precedence below before picking one.
78
77
79
78
### Using the Helm chart
80
79
81
-
Set `operator.args.statementLoggingMaxSampleRate`when installing or upgrading
82
-
the operator:
80
+
Set either value when installing or upgrading the operator. For example, to
0 commit comments