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

Klaus Ma commented on MESOS-5600:
---------------------------------

OK, thanks; one more comments :).

In {{DRFSorter::allocated()}}, the {{allocations}} of client was updated so 
{{dirty}} should be true to trigger {{sort()}} and {{update(name)}} seems not 
necessary as the {{share}} will be re-calculated in {{sort()}}.
 
Further more, I'm thinking how many performance contribution will {{dirty}} 
help? In each allocator loop, the allocation maybe changed so the sorter should 
re-calculate the order.

To improve the performance, I think we can only update the single client in 
{{allocated}} & {{unallocated}}; and only return clients list in {{sort()}} 
(the client was sorted when inserted in {{allocated}} & {{unallocated}}).

> "dirty" was never set back as false in sorter
> ---------------------------------------------
>
>                 Key: MESOS-5600
>                 URL: https://issues.apache.org/jira/browse/MESOS-5600
>             Project: Mesos
>          Issue Type: Bug
>          Components: allocation
>            Reporter: Guangya Liu
>            Assignee: Guangya Liu
>
> dirty was set as true when the total resource was updated in the cluster, but 
> it was never set back as false. The dirty should be set back as false in 
> DRFSorter::sort 
> https://github.com/apache/mesos/blob/master/src/master/allocator/sorter/drf/sorter.cpp#L320-L334
> The reason that we cannot detect this is because once an agent was added to 
> cluster, the dirty will be set as true and the sorter will always call sort() 
> to calculate share for each framework, this will impact the performance.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to