mirror of
https://github.com/wassname/ray.git
synced 2026-08-07 11:27:43 +08:00
Take into account queue length in autoscaling (#5684)
This commit is contained in:
@@ -131,8 +131,11 @@ const Task &SchedulingQueue::GetTaskOfState(const TaskID &task_id,
|
||||
}
|
||||
|
||||
ResourceSet SchedulingQueue::GetResourceLoad() const {
|
||||
// TODO(atumanov): consider other types of tasks as part of load.
|
||||
return ready_queue_->GetCurrentResourceLoad();
|
||||
auto load = ready_queue_->GetCurrentResourceLoad();
|
||||
// Also take into account infeasible tasks so they show up for autoscaling.
|
||||
load.AddResources(
|
||||
task_queues_[static_cast<int>(TaskState::INFEASIBLE)]->GetCurrentResourceLoad());
|
||||
return load;
|
||||
}
|
||||
|
||||
const std::unordered_set<TaskID> &SchedulingQueue::GetBlockedTaskIds() const {
|
||||
|
||||
Reference in New Issue
Block a user