You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Meng Zhu <mz...@mesosphere.io> on 2019/04/13 02:22:19 UTC

Review Request 70469: Optimized weighted shuffling in the random sorter.

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

Review request for mesos and Benjamin Mahler.


Bugs: MESOS-9723
    https://issues.apache.org/jira/browse/MESOS-9723


Repository: mesos


Description
-------

This patch optimizes the permutation step of the weighted
shuffling function used by the random sorter.
The permutation step now has constant memory cost and
O(n) time complexity.

This is based on the algorithm described in:
https://s.apache.org/o7K0

Also added a unit test.


Diffs
-----

  src/master/allocator/sorter/random/utils.hpp 1329359040082ed128d8dbc45381aa3e529224e4 
  src/tests/sorter_tests.cpp 9d52a80eafb6f955386a6575875daacf5d4b4e9e 


Diff: https://reviews.apache.org/r/70469/diff/1/


Testing
-------

make check


Thanks,

Meng Zhu


Re: Review Request 70469: Optimized weighted shuffling in the random sorter.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70469/#review214674
-----------------------------------------------------------



PASS: Mesos patch 70469 was successfully built and tested.

Reviews applied: `['70469']`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/3178/mesos-review-70469

- Mesos Reviewbot Windows


On April 13, 2019, 2:22 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70469/
> -----------------------------------------------------------
> 
> (Updated April 13, 2019, 2:22 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9723
>     https://issues.apache.org/jira/browse/MESOS-9723
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch optimizes the permutation step of the weighted
> shuffling function used by the random sorter.
> The permutation step now has constant memory cost and
> O(n) time complexity.
> 
> This is based on the algorithm described in:
> https://s.apache.org/o7K0
> 
> Also added a unit test.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/sorter/random/utils.hpp 1329359040082ed128d8dbc45381aa3e529224e4 
>   src/tests/sorter_tests.cpp 9d52a80eafb6f955386a6575875daacf5d4b4e9e 
> 
> 
> Diff: https://reviews.apache.org/r/70469/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70469: Optimized weighted shuffling in the random sorter.

Posted by Meng Zhu <mz...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70469/
-----------------------------------------------------------

(Updated April 16, 2019, 9:39 a.m.)


Review request for mesos and Benjamin Mahler.


Changes
-------

Updated benchmark result.


Bugs: MESOS-9723
    https://issues.apache.org/jira/browse/MESOS-9723


Repository: mesos


Description
-------

This patch optimizes the permutation step of the weighted
shuffling function used by the random sorter.
The permutation step now has constant memory cost and
O(n) time complexity.

This is based on the algorithm described in:
https://s.apache.org/o7K0

Also added a unit test.


Diffs
-----

  src/master/allocator/sorter/random/utils.hpp 1329359040082ed128d8dbc45381aa3e529224e4 
  src/tests/sorter_tests.cpp 9d52a80eafb6f955386a6575875daacf5d4b4e9e 


Diff: https://reviews.apache.org/r/70469/diff/1/


Testing (updated)
-------

make check

Ran a modified sorter benchmark:

Before: 100000 runs of sort of 2000 clients took 9.113634ms
After: 100000 runs of sort of 2000 clients took 8.802126ms

It appears to have minimal performance improvement.


Thanks,

Meng Zhu