mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 64028: Removed duplicate resources conversions.
Date Thu, 30 Nov 2017 02:44:13 GMT

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


Ship it!




Ship It!

- Benjamin Mahler


On Nov. 28, 2017, 5:41 p.m., Dmitry Zhuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64028/
> -----------------------------------------------------------
> 
> (Updated Nov. 28, 2017, 5:41 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `RepeatedPtrField<Resource>` can be implicitly converted to `Resources`,
> leading to hidden multiple resources conversions on performance-critical
> paths in master. For example, `operator +=` relies on implicit
> conversion, when invoked with `RepeatedPtrField<Resource>` argument.
> Using protobuf also implies data validation and sanitization, e.g. when
> converting to `Resources`, as protobuf generally comes from untrusted
> sources. By doing conversion only once, and then reusing the result,
> we save on these checks as well, as operations on `Resources` are
> generally faster as they can trust data in `Resources`.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp 2a2e830354db4a2191fb8321beb8174b80f7ba7d 
>   src/master/master.cpp 53263e499d88b906b6406c24c0dfb737e589e813 
> 
> 
> Diff: https://reviews.apache.org/r/64028/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> ./mesos-tests.sh --benchmark --gtest_filter=AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.*
> 
> Before changes:
> [==========] Running 3 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 3 tests from AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test
> [ RUN      ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/0
> Starting reregistration for all agents
> Reregistered 2000 agents with a total of 100000 running tasks and 100000 completed tasks
in 13.267079264secs
> [       OK ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/0
(25274 ms)
> [ RUN      ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/1
> Starting reregistration for all agents
> Reregistered 2000 agents with a total of 200000 running tasks and 0 completed tasks in
26.212404584secs
> [       OK ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/1
(52153 ms)
> [ RUN      ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/2
> Starting reregistration for all agents
> Reregistered 20000 agents with a total of 100000 running tasks and 0 completed tasks
in 20.269919213secs
> [       OK ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/2
(34072 ms)
> [----------] 3 tests from AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test (111499
ms total)
> 
> [----------] Global test environment tear-down
> [==========] 3 tests from 1 test case ran. (111515 ms total)
> [  PASSED  ] 3 tests.
> 
> 
> After cahnges:
> [==========] Running 3 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 3 tests from AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test
> [ RUN      ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/0
> Starting reregistration for all agents
> Reregistered 2000 agents with a total of 100000 running tasks and 100000 completed tasks
in 12.550849382secs
> [       OK ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/0
(24289 ms)
> [ RUN      ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/1
> Starting reregistration for all agents
> Reregistered 2000 agents with a total of 200000 running tasks and 0 completed tasks in
24.63363665secs
> [       OK ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/1
(44266 ms)
> [ RUN      ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/2
> Starting reregistration for all agents
> Reregistered 20000 agents with a total of 100000 running tasks and 0 completed tasks
in 18.150451886secs
> [       OK ] AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test.AgentReregistrationDelay/2
(32117 ms)
> [----------] 3 tests from AgentFrameworkTaskCount/MasterFailover_BENCHMARK_Test (100672
ms total)
> 
> [----------] Global test environment tear-down
> [==========] 3 tests from 1 test case ran. (100688 ms total)
> [  PASSED  ] 3 tests.
> 
> 
> Thanks,
> 
> Dmitry Zhuk
> 
>


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