flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7870) SlotPool should cancel the slot request to RM if not need any more.
Date Fri, 03 Nov 2017 11:02:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-7870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237447#comment-16237447
] 

ASF GitHub Bot commented on FLINK-7870:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4887#discussion_r148754465
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
---
    @@ -302,7 +302,12 @@ public boolean unregisterSlotRequest(AllocationID allocationId) {
     		PendingSlotRequest pendingSlotRequest = pendingSlotRequests.remove(allocationId);
     
     		if (null != pendingSlotRequest) {
    -			cancelPendingSlotRequest(pendingSlotRequest);
    +			if (pendingSlotRequest.isAssigned()) {
    +				cancelPendingSlotRequest(pendingSlotRequest);
    +			}
    +			else {
    +				resourceActions.cancelResourceAllocation(pendingSlotRequest.getResourceProfile());
    --- End diff --
    
    Then this should be added as a separate feature because it is not strictly required by
this PR here.
    
    Furthermore, I'm not sure whether this shouldn't be the responsibility of the `ResourceManager`.
E.g. we could think about adding a timeout for container requests after which we cancel them.
Additionally, if we add support for starting machines with multiple slots, then we shouldn't
release a requested resource if only a single of it slots is no longer needed. That is something
else to consider before adding the cancel resource allocation method.


> SlotPool should cancel the slot request to RM if not need any more.
> -------------------------------------------------------------------
>
>                 Key: FLINK-7870
>                 URL: https://issues.apache.org/jira/browse/FLINK-7870
>             Project: Flink
>          Issue Type: Bug
>          Components: Cluster Management
>            Reporter: shuai.xu
>            Assignee: shuai.xu
>            Priority: Major
>              Labels: flip-6
>
> 1. SlotPool will request slot to rm if its slots are not enough.
> 2. If a slot request is not fulfilled in a certain time, SlotPool will treat the request
as timeout and send a new slot request by triggering a failover in JobMaster, the previous
request is not needed any more, but rm does not know it.
> 3. This may cause the rm request much more resource than the job really need.
> For example:
> 1. A job need 100 slots. RM request 100 container to YARN.
> 2. But YARN is busy now, it has no resource for the job.
> 3. The job failover as the resource request not fulfilled in time.
> 4. It ask 100 slots again, now RM request 200 container to YARN.
> 5. If failover server time, the containers request  will become more and more.
> 6. Now YARN has resource, it will find that the job may need thousands of containers.
This is a waste of resources.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message