Skip to content

Implement more sophisticated scheduler #3147

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

Open
amscanne opened this issue Jul 6, 2020 · 6 comments
Open

Implement more sophisticated scheduler #3147

amscanne opened this issue Jul 6, 2020 · 6 comments
Labels
priority: p2 Normal priority roadmap type: enhancement New feature or request

Comments

@amscanne
Copy link
Contributor

amscanne commented Jul 6, 2020

Today, the scheduler is essentially the Go runtime scheduler. In some cases however, this can lead to poor interactions between application threads and extra cycles burnt (e.g. #2033, #1942).

This issue serves as the parent issue for scheduler exploration. There are effectively two possible paths that we will pursue:

  1. Reduce negative interactions with the Go scheduler by binding task goroutines directly to host threads. This may require some modifications to the Go runtime that allow for a larger number of Ps, as many of the poor interactions come at the entersyscall/exitsyscall time (and may involve the sysmon thread). This has advantage that it's likely to map closely to host performance if done correctly. It has the disadvantage that the number of threads is under user control, and the failure to create a new host thread can take place at any point in the runtime (likely taking down the sandbox).
  2. Take more control over interactions with the Go runtime and implement some custom scheduling functionality. This will likely require more work, and it's unclear to the extent we can implement anything reasonably performance. However, this does not suffer from the host thread limit failures discussed in (1).

Today we effectively have some of the worst of both (1) and (2). We should continue to explore the appropriate avenue, come up with a design and improve our scheduler scalability.

@amscanne amscanne added roadmap priority: p2 Normal priority type: enhancement New feature or request labels Jul 6, 2020
@fly3366
Copy link

fly3366 commented Feb 16, 2023

Any change?

1 similar comment
@kscooo
Copy link

kscooo commented Aug 21, 2024

Any change?

@milantracy
Copy link
Contributor

Any change?

@kscooo which change are you looking for specifically?

@kscooo
Copy link

kscooo commented Aug 23, 2024

@milantracy Implement high-performance Go scheduler

@milantracy
Copy link
Contributor

@milantracy Implement high-performance Go scheduler

understand

@kscooo would you mind sharing your use case, and the bottleneck that you think could be mitigated by having the feature?

there might be other workaround that could be helpful

@kscooo
Copy link

kscooo commented Aug 26, 2024

@milantracy I actually don't have extensive experience using gvisor, I'm just curious about the overall details of the documentation and code implementation of the proposed improvement plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Normal priority roadmap type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants