Skip to content

kvserver: improve help text for admission.io.overload#90788

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:221027.ac-io-thresh
Oct 27, 2022
Merged

kvserver: improve help text for admission.io.overload#90788
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:221027.ac-io-thresh

Conversation

@irfansharif
Copy link
Copy Markdown
Contributor

@irfansharif irfansharif commented Oct 27, 2022

Since this is text that's available in any running binary (SHOW ALL CLUSTER SETTINGS), we shouldn't expect readers to have the source code checked out, which makes our referencing of specific file names less than useful. See #87656 (review).

Release note: None
Release justification: No behavioural change, only changing user-visible help text.

@irfansharif irfansharif requested a review from a team as a code owner October 27, 2022 18:31
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@KaiSun314 KaiSun314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for improving the help text for admission.io.overload!
:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @irfansharif and @kvoli)


pkg/kv/kvserver/metrics.go line 1063 at r1 (raw file):

		Help: `1-normalized float indicating whether IO admission control considers the store as overloaded with respect to compaction out of L0 (considers sub-level and file counts).`
		Measurement: "Threshold",
		Unit:        metric.Unit_PERCENT,

The range for admission io overload metric is technically [0, +∞) (albeit most of the time this metric should be within [0, 1)). Moreover, we compare this metric against the threshold set by the admission.kv.pause_replication_io_threshold cluster setting, which may not be 1. I was wondering if Unit_PERCENT would still be proper if admission io overload metric could be > 1?

Copy link
Copy Markdown
Contributor

@KaiSun314 KaiSun314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @irfansharif and @kvoli)


pkg/kv/kvserver/metrics.go line 1061 at r1 (raw file):

	metaIOOverload = metric.Metadata{
		Name: "admission.io.overload",
		Help: `1-normalized float indicating whether IO admission control considers the store as overloaded with respect to compaction out of L0 (considers sub-level and file counts).`

Need comma at end of line

Since this is text that's available in any running binary (`SHOW ALL
CLUSTER SETTINGS`), we shouldn't expect readers to have the source code
checked out, which makes our referencing of specific file names less
than useful.

Release note: None
Release justification: No behavioural change, only changing user-visible
help text.
Copy link
Copy Markdown
Contributor Author

@irfansharif irfansharif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @KaiSun314 and @kvoli)


pkg/kv/kvserver/metrics.go line 1061 at r1 (raw file):

Previously, KaiSun314 (Kai Sun) wrote…

Need comma at end of line

Done.


pkg/kv/kvserver/metrics.go line 1063 at r1 (raw file):
Unit percent is fine, it's sensible to say we're 150% of the threshold since AC is off/malfunctioning for ex.

Moreover, we compare this metric against the threshold set by the admission.kv.pause_replication_io_threshold cluster setting, which may not be 1

A lot of our % based controls/cluster settings are floating point ones, so that feels fine too. These for ex.:

var ( // cluster settings to control how elastic CPU % is adjusted
elasticCPUMaxUtilization = settings.RegisterFloatSetting(
settings.SystemOnly,
"admission.elastic_cpu.max_utilization",
"sets the ceiling on per-node elastic work CPU % utilization",
0.75, // 75%
func(f float64) error {
if f < 0.05 || f > 1.0 {
return fmt.Errorf("expected max_utilization to be between [0.0, 1.0], got %0.2f", f)
}
return nil
},
)
elasticCPUMinUtilization = settings.RegisterFloatSetting(
settings.SystemOnly,
"admission.elastic_cpu.min_utilization",
"sets the floor on per-node elastic work CPU % utilization",
0.05, // 5%
func(f float64) error {
if f < 0.01 || f > 1.0 {
return fmt.Errorf("expected min_utilization to be between [0.01, 1.0], got %0.2f", f)
}
return nil
},
)
elasticCPUInactivePoint = settings.RegisterFloatSetting(
settings.SystemOnly,
"admission.elastic_cpu.inactive_point",
"the point between {min,max}_utilization the CPU % decreases to when there's no elastic work",
0.10, // 10% of the way between {min,max} utilization -- 12% if [min,max] = [5%,75%]
func(f float64) error {
if f < 0.0 || f > 1.0 {
return fmt.Errorf("expected inactive_point to be between [0.0, 1.0], got %0.2f", f)
}
return nil
},
)
elasticCPUAdjustmentDeltaPerSecond = settings.RegisterFloatSetting(
settings.SystemOnly,
"admission.elastic_cpu.adjustment_delta_per_second",
"sets the per-second % adjustment used when when adapting elastic work CPU %s",
0.001, // 0.1%, takes 10s to add 1% to elastic CPU limit
func(f float64) error {
if f < 0.0001 || f > 1.0 {
return fmt.Errorf("expected additive_delta_per_second to be between [0.0001, 1.0], got %0.2f", f)
}
return nil
},
)

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 27, 2022

👎 Rejected by code reviews

@irfansharif
Copy link
Copy Markdown
Contributor Author

Oh RIP, @KaiSun314, you might have re-stamp.

@irfansharif irfansharif requested a review from KaiSun314 October 27, 2022 19:45
Copy link
Copy Markdown
Contributor

@KaiSun314 KaiSun314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oop sorry about that, thanks again for making this improvement!

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@irfansharif
Copy link
Copy Markdown
Contributor Author

Nothing to apologize for!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 27, 2022

Build succeeded:

@craig craig bot merged commit 6fba541 into cockroachdb:master Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants