You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


Document the state by adding a label to the FLIP page with one of "discussion", "accepted", "released", "rejected".

Discussion thread
Vote thread
JIRA

Unable to render Jira issues macro, execution error.

ReleaseTBA

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Currently, ResourceManager will only start a a new worker when there's resource requirements from job. But in certain scenarios, it is necessary to maintain a certain amount of slots as soon as ResourceManager is started. And these slots should not release even if all slots are free. Here are some scenarios which can benefit from this proposal:

  1. Users actually know how many resources are needed when run a single job, initialize all workers when cluster starts can speed up startup process
  2. Job schedule in topology order, next operator won't schedule until prior execution slot allocated. The TaskExecutors will start in several batchs in some cases, it might slow down the startup speed
  3. Flink support FLINK-12122 [Spread out tasks evenly across all available registered TaskManagers], but it will only effect if all TMs are registered. Start all TMs at begining can slove this problem
  4. For session clusters running short lived-jobs, cluster should have workers all the time to reduce job's E2E latency 

Public Interfaces

A public interface is any change to the following:

Option nameDefault Value
slotmanager.number-of-slots.min0
slotmanager.min-total-resource.cpuno default value, can be derived from slotmanager.number-of-slots.min
slotmanager.min-total-resource.memoryno default value, can be derived from slotmanager.number-of-slots.min

Proposed Changes

Minimum required resource check in DefaultResourceAllocationStrategy

The minimum resource allocation will be implemented in the DefaultResourceAllocationStrategy of FineGrainedSlotManager.

Each time when SlotManager need to reconcile the cluster resources or fulfill job resource requirements, the DefaultResourceAllocationStrategy will check if the minimum resource requirement has been fulfilled. If it is not, DefaultResourceAllocationStrategy will add PendingTaskManagers to the ResourceAllocationResult/ResourceReconcileResult and FineGrainedSlotManager will allocate new worker resources accordingly.

Resource stability check in SlotManagerConfiguration

After minimum required resource options is introduced, user can configure both minimum and maximum required resource in SlotManager which might lead to worker resource oscillation. Here is an example:

taskmanager.numberOfTaskSlots: 5
slotmanager.number-of-slots.min: 11
slotmanager.number-of-slots.max: 14

In this case, the min required worker number derived from DefaultResourceAllocationStrategy is 3 but this will exceed the max total resource.

To Avoid this oscillation, we need to check the worker number derived from minimum and maximum resource configuration is consistent before starting the SlotManager.


Compatibility, Deprecation, and Migration Plan

  • What impact (if any) will there be on existing users?  No

Test Plan

UT & Manually verify that the min resource allocation is working as expected.

Rejected Alternatives

If there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.

  • No labels