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

feat: sched: Add scheduler interfaces, configurable assigner #8700

Merged
merged 9 commits into from
May 26, 2022

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented May 23, 2022

Related Issues

Proposed Changes

  • Add some more interfaces to the scheduling logic, which should make it easier to customize scheduling logic
  • Add config allowing selection of worker assigners.
  • Introduce new, simpler worker assigning logic - when enabled, the "spread" assigner will ignore worker utilization, and will attempt to assign tasks to as many workers as possible

To use the new assigner:

[Storage]
 # Assigner specifies the worker assigner to use when scheduling tasks.
 # "utilization" (default) - assign tasks to workers with lowest utilization.
 # "spread" - assign tasks to as many distinct workers as possible.
 #
 # type: string
 # env var: LOTUS_STORAGE_ASSIGNER
 Assigner = "spread"

TODO

  • Take worker load in the spread assigner into account (don't assign too much)
  • Test the spread assigner at least somewhat

@magik6k magik6k force-pushed the feat/multi-sched branch from fa73c1c to 16f434c Compare May 23, 2022 20:02
@magik6k magik6k marked this pull request as ready for review May 23, 2022 20:33
@magik6k magik6k requested a review from a team as a code owner May 23, 2022 20:33
@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #8700 (3de34ea) into master (df98a2a) will increase coverage by 0.05%.
The diff coverage is 89.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8700      +/-   ##
==========================================
+ Coverage   40.82%   40.88%   +0.05%     
==========================================
  Files         688      691       +3     
  Lines       75916    75992      +76     
==========================================
+ Hits        30996    31068      +72     
+ Misses      39579    39563      -16     
- Partials     5341     5361      +20     
Impacted Files Coverage Δ
extern/sector-storage/manager.go 61.95% <50.00%> (-0.15%) ⬇️
extern/sector-storage/selector_task.go 61.11% <66.66%> (+27.77%) ⬆️
extern/sector-storage/sched_assigner_common.go 78.75% <78.75%> (ø)
extern/sector-storage/request_queue.go 86.66% <81.81%> (ø)
extern/sector-storage/sched.go 82.89% <82.22%> (-3.04%) ⬇️
extern/sector-storage/sched_assigner_spread.go 91.48% <91.48%> (ø)
extern/sector-storage/sched_post.go 81.60% <92.30%> (ø)
extern/sector-storage/sched_worker.go 79.41% <95.45%> (+0.58%) ⬆️
...xtern/sector-storage/sched_assigner_utilization.go 100.00% <100.00%> (ø)
extern/sector-storage/sched_resources.go 86.45% <100.00%> (ø)
... and 28 more

@magik6k magik6k merged commit cfff877 into master May 26, 2022
@magik6k magik6k deleted the feat/multi-sched branch May 26, 2022 19:20
@rjan90 rjan90 mentioned this pull request Jul 22, 2022
14 tasks
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.

2 participants