volcano icon indicating copy to clipboard operation
volcano copied to clipboard

[good first issue]It's better to check and skip allocation for job when it is poped

Open lowang-bh opened this issue 2 years ago • 18 comments

Here(line-175), all the former checks is discarded and waste time because allocating for this task will cause queue overused.

We just need to get job's minResource and check whether the queue will be overused. If it will be overused, skiping this job.

https://github.com/volcano-sh/volcano/blob/04a3b1b6b6b3550e292c7d3132fc1fbf3f6932cd/pkg/scheduler/actions/allocate/allocate.go#L170-L179

What would you like to be added:

Add job's minResource check once job is popped (line-143) from queue.

https://github.com/volcano-sh/volcano/blob/04a3b1b6b6b3550e292c7d3132fc1fbf3f6932cd/pkg/scheduler/actions/allocate/allocate.go#L143-L158

Why is this needed:

To save time.

lowang-bh avatar Aug 13 '23 04:08 lowang-bh

/good first issue /help wanted

lowang-bh avatar Aug 13 '23 04:08 lowang-bh

/assign

srikanth-iyengar avatar Aug 13 '23 15:08 srikanth-iyengar

image

Will this work @lowang-bh ?

srikanth-iyengar avatar Aug 13 '23 17:08 srikanth-iyengar

Will this work @lowang-bh ?

Here it does not work.

lowang-bh avatar Aug 14 '23 03:08 lowang-bh

Will this work @lowang-bh ?

Here it does not work.

I misunderstood the issue Will correct it Thanks @lowang-bh

srikanth-iyengar avatar Aug 14 '23 03:08 srikanth-iyengar

Hey @lowang-bh Just wanted to clarify that we can get the jobs MinResource by the GetMinResource function and need to check if this resource less than Queues Capability ?

srikanth-iyengar avatar Aug 14 '23 06:08 srikanth-iyengar

Just wanted to clarify that we can get the jobs MinResource by the GetMinResource function and need to check if this resource less than Queues Capability ?

Yes, I think so. queue.used + job.min will less than queue.cap

lowang-bh avatar Aug 14 '23 07:08 lowang-bh

image should I use the TotalRequest or image this GetMinResources ( which states that it returns minimum resource of pod group )

srikanth-iyengar avatar Aug 14 '23 11:08 srikanth-iyengar

image Will this work @lowang-bh ?

srikanth-iyengar avatar Aug 14 '23 11:08 srikanth-iyengar

How about just break the task loop?

Monokaix avatar May 14 '24 07:05 Monokaix

How about just break the task loop?

The mimMember is the least cost to running a job. And job's minResource is correspding to its memMember. If a queue's used + job's mimResource will be overused, then the allocation will be interupted from allocating. So we can put the check forwarding, so that it will save a amount of time on allocating and discarding with a large job.

This feature depend on the job's accurate mimResource calculation as PR #3057, and also has relationship with https://github.com/volcano-sh/volcano/pull/3430

lowang-bh avatar May 15 '24 05:05 lowang-bh