Skip to content

admission: remove soft/moderate load slots#95590

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:230120.rm-soft-slots
Jan 23, 2023
Merged

admission: remove soft/moderate load slots#95590
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:230120.rm-soft-slots

Conversation

@irfansharif
Copy link
Copy Markdown
Contributor

@irfansharif irfansharif commented Jan 20, 2023

We originally introduced these notions in admission control (#78519) for additional threads for Pebble compaction compression. We envisioned granting these "squishy" slots to background activities and permit work only under periods of low load. In working through #86638 (as part of #75066), we observed experimentally that the moderate-slots count was not sensitive enough to scheduling latency, and consequently latency observed by foreground traffic. Elastic CPU tokens, the kind now being used for backups, offer an alternative to soft slots. We've since replaced uses of soft slots with elastic CPU tokens.

This PR just removes the now dead-code code around soft/moderate load slots (it's better to minimize the number of mechanisms in the admission package). Fixes #88032.

Release note: None


First commit is from #95007.

@irfansharif irfansharif requested a review from a team as a code owner January 20, 2023 17:42
@irfansharif irfansharif requested a review from a team January 20, 2023 17:42
@irfansharif irfansharif requested a review from a team as a code owner January 20, 2023 17:42
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!
:lgtm:

Reviewed 8 of 8 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @irfansharif)


pkg/util/admission/granter.go line 154 at r2 (raw file):

}

//gcassert:inline

nit: there are some remaining names with HighLoad in them


pkg/util/admission/kv_slot_adjuster.go line 114 at r2 (raw file):

		kvsa.granter.setTotalSlotsLocked(
			tryDecreaseSlots(kvsa.granter.totalSlots, true))
	} else if float64(runnable) <= float64((threshold*procs)/4) {

this 1/4 threshold else block can go away now, since it is subsumed by the succeeding 1/2 threshold else block.

We originally introduced these notions in admission control (cockroachdb#78519) for
additional threads for Pebble compaction compression. We envisioned
granting these "squishy" slots to background activities and permit work
only under periods of low load. In working through cockroachdb#86638 (as part of
\cockroachdb#75066), we observed experimentally that the moderate-slots count was
not sensitive enough to scheduling latency, and consequently latency
observed by foreground traffic. Elastic CPU tokens, the kind now being
used for backups, offer an alternative to soft slots. We've since
replaced uses of soft slots with elastic CPU tokens.

This PR just removes the now dead-code code around soft/moderate load
slots (it's better to minimize the number of mechanisms in the admission
package). Fixes cockroachdb#95590.

Release note: None
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.

bors r+

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


pkg/util/admission/granter.go line 154 at r2 (raw file):

Previously, sumeerbhola wrote…

nit: there are some remaining names with HighLoad in them

Done.


pkg/util/admission/kv_slot_adjuster.go line 114 at r2 (raw file):

Previously, sumeerbhola wrote…

this 1/4 threshold else block can go away now, since it is subsumed by the succeeding 1/2 threshold else block.

Done.

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 23, 2023

Build failed:

@irfansharif
Copy link
Copy Markdown
Contributor Author

Unrelated flake; pinged #95664.

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 23, 2023

Build succeeded:

@craig craig bot closed this in f39eefb Jan 23, 2023
@craig craig bot merged commit 479e5aa into cockroachdb:master Jan 23, 2023
@irfansharif irfansharif deleted the 230120.rm-soft-slots branch January 24, 2023 00:43
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.

admission: replace soft slots mechanism with elastic cpu tokens

3 participants