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

Meng Zhu commented on MESOS-9504:
---------------------------------

commit a5af0162dbe77ba3d76d94b2a2b4beb92d63f83a
Author: Meng Zhu [email protected]
Date:   Fri Mar 29 15:39:17 2019 -0700

{noformat}
Used `ResourceQuantities` in `__allocate()` when appropriate.

Replaced `Resources` with `ResourceQuantities` when
appropriate in `__allocate()`. This simplifies the
code and improves performance.

Review: https://reviews.apache.org/r/70320
{noformat}

{noformat}
commit ef26c536f89c76ec2752299096bc5f5538753ed2
Author: Meng Zhu [email protected]
Date:   Wed Mar 27 17:17:32 2019 -0700


Used `ResourceQuantities` in the sorter when appropriate.

Replaced `Resources` with `ResourceQuantities` when
appropriate in the sorter. This simplifies the code
and improves performance.

Review: https://reviews.apache.org/r/70330
{noformat}

> Use ResourceQuantities in the allocator and sorter to improve performance.
> --------------------------------------------------------------------------
>
>                 Key: MESOS-9504
>                 URL: https://issues.apache.org/jira/browse/MESOS-9504
>             Project: Mesos
>          Issue Type: Improvement
>          Components: allocation
>            Reporter: Meng Zhu
>            Assignee: Meng Zhu
>            Priority: Major
>              Labels: performance
>
> In allocator and sorter, we need to do a lot of quantity calculations. 
> Currently, we use the full {{Resources}} type with utilities like 
> {{createScalarResourceQuantities()}}, even though we only care about 
> quantities. Replace {{Resources}} with {{ResourceQuantities}}.
> See:
> https://github.com/apache/mesos/blob/386b1fe99bb9d10af2abaca4832bf584b6181799/src/master/allocator/sorter/drf/sorter.hpp#L444-L445
> https://reviews.apache.org/r/70061/
> With the addition of ResourceQuantities, callers can now just do 
> {{ResourceQuantities.fromScalarResources(r.scalars())}} instead of using 
> {{Resources::createStrippedScalarQuantity()}}, which should actually be a bit 
> more efficient since we only copy the shared pointers rather than construct 
> new `Resource` objects.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to