mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam B" <a...@mesosphere.io>
Subject Re: Review Request 41597: Extending allocator interface to support dynamic weights.
Date Fri, 15 Jan 2016 08:07:28 GMT


> On Jan. 6, 2016, 2:09 a.m., Adam B wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1048-1051
> > <https://reviews.apache.org/r/41597/diff/36/?file=1183523#file1183523line1048>
> >
> >     Does anything rely on this behavior of erasing 1.0s from the hashmap? I know
it'll (slightly) reduce the number of bits in memory and persisted in the registry, but is
there any other reason to do this? Might be a premature optimization. Besides, the sorters
still get updated for 1.0s.
> >     Thoughts?
> 
> Yongqiao Wang wrote:
>     There is no any other reasons for erasing the default weight frm the hasmap. In HierarchicalAllocatorProcess::roleWeight
method of allocator, if the role's weight does not exist in weights hashmap, then it will
return 1.0. so it is make sence to the erase it.
>     
>     In addition, we should keep the same behaviour to only save the non-default weights
in allocator, master and registry.

I'm all for consistency, but since this behavior doesn't exist anywhere else (yet), and there's
no strong need for it, I'm inclined to follow the KISS principle and not treat 1.0 updates
specially. Let's not erase the 1.0s, and just update weights[role] just like with any other
valid value.

If it seems like a reasonable speed/space optimization, we can consider it later for allocator,
master, and/or registry. I can't foresee any backwards compatibility issues if we have to
change it later.


- Adam


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41597/#review113035
-----------------------------------------------------------


On Jan. 12, 2016, 1:34 a.m., Yongqiao Wang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41597/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2016, 1:34 a.m.)
> 
> 
> Review request for mesos, Adam B, Neil Conway, and Qian Zhang.
> 
> 
> Bugs: MESOS-3943
>     https://issues.apache.org/jira/browse/MESOS-3943
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add the interface in allocator to support updating weight
> at runtime, and the allocator is invoked to allocate the
> resources based on the updated weights later.
> 
> 
> Diffs
> -----
> 
>   include/mesos/master/allocator.hpp fcebcab71c50a725ca4e635c03c29eed2a406bc3 
>   include/mesos/mesos.proto 74e9d00d6826adfb7fd2433c3deced6d2ca51e98 
>   include/mesos/v1/mesos.proto 879107d842fd0d008b93fa10db7da8572640ea43 
>   src/master/allocator/mesos/allocator.hpp 50ef3b20f34bc6d87cbeccabcebec9a5031a6554 
>   src/master/allocator/mesos/hierarchical.hpp 86ea5a402ed67f8f22f11d5730147cd907d66a08

>   src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f

>   src/master/allocator/sorter/drf/sorter.hpp 050896e8b12cd4097ccd137d5284d6b39b0f06ab

>   src/master/allocator/sorter/drf/sorter.cpp 3a442f121f3a1505513877a5c78458a4b8d0a824

>   src/master/allocator/sorter/sorter.hpp 7be6b44a762fd62c2cd7f28b4dc4865a4587ed26 
>   src/tests/allocator.hpp 9bdfaecf1a148f113ad52956b50ed7cabe0902ef 
> 
> Diff: https://reviews.apache.org/r/41597/diff/
> 
> 
> Testing
> -------
> 
> Make & Make check successfully!
> 
> Test case: https://reviews.apache.org/r/41672/
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message