Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scx_layered: Implement per-layer weight #646

Open
htejun opened this issue Sep 10, 2024 · 0 comments
Open

scx_layered: Implement per-layer weight #646

htejun opened this issue Sep 10, 2024 · 0 comments
Labels
help wanted Extra attention is needed scx_layered

Comments

@htejun
Copy link
Contributor

htejun commented Sep 10, 2024

While layered implements rudimentary load-sum based fairness mechanism between layers, this in practice doesn't really work as the load sums are calculated without the necessary infeasible weight adjustments. In all the current production deployments, the --no-load-frac-limit option is used to disable the mechanism. This leaves no mechanism to limit consumption of any given layer and can lead to various starvation scenarios under contention.

Now that the solution library for infeasiable weights is available in scx_utils, it should be possible to implement load fraction based layer fairness. However, production experiences indicate that what'd be more useful is simple per-layer weights. So:

  • Remove load fraction based layer fairness mechanism. Maybe leave the command line option for backward compatibility for the time being?
  • Implement explicit per-layer weight. Follow the convention where 100 is the default weight, 1 minimum, 10000 maximum. Under contention, this should guide how many CPUs each layer gets and also should limit preemption when the layer is over its quota.
  • Use the same mechanism to protect LO_FALLBACK_DSQ and revive the use of it.
@htejun htejun added the help wanted Extra attention is needed label Sep 10, 2024
@likewhatevs likewhatevs self-assigned this Sep 23, 2024
@likewhatevs likewhatevs removed their assignment Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed scx_layered
Projects
None yet
Development

No branches or pull requests

3 participants