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 67871: Optimized the generation of metrics snapshots.
Date Tue, 10 Jul 2018 19:26:38 GMT

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


Fix it, then Ship it!




Thanks Greg! At some point we need a simpler benchmark in libprocess to iterate on library
improvements more quickly.


3rdparty/libprocess/src/metrics/metrics.cpp
Lines 148-153 (original), 147-152 (patched)
<https://reviews.apache.org/r/67871/#comment288858>

    You may want to try comparing this against a single vector of tuple, but definitely can
do that as a follow up.



3rdparty/libprocess/src/metrics/metrics.cpp
Line 217 (original), 223 (patched)
<https://reviews.apache.org/r/67871/#comment288859>

    We should probably pre-increment as a pattern in all for loops, it doesn't matter here,
but it matters in iterator loops as james pointed out (unless compilers are able to optimize
it :)).



3rdparty/libprocess/src/metrics/metrics.cpp
Lines 226-227 (patched)
<https://reviews.apache.org/r/67871/#comment288860>

    Why non-const here?


- Benjamin Mahler


On July 10, 2018, 6:21 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67871/
> -----------------------------------------------------------
> 
> (Updated July 10, 2018, 6:21 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Gastón Kleiman, and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Optimized the generation of metrics snapshots.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/metrics/metrics.hpp f9b72029b2c85826c91b1d7656b0af94dc87010c

>   3rdparty/libprocess/src/metrics/metrics.cpp 4883c9acaa0cc568e27944661a8208f7b2a356a1

> 
> 
> Diff: https://reviews.apache.org/r/67871/diff/1/
> 
> 
> Testing
> -------
> 
> WITH per-framework metrics, BEFORE optimizations:
> ```
> [ RUN      ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/0
> Test setup: 1 agents with a total of 105 frameworks
> unversioned /metrics/snapshot' response took 157.1449ms
> v1 'master::call::GetMetrics' application/x-protobuf response took 152.599692ms
> v1 'master::call::GetMetrics' application/json response took 198.918334ms
> [       OK ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/0
(835 ms)
> [ RUN      ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/1
> Test setup: 1 agents with a total of 1005 frameworks
> unversioned /metrics/snapshot' response took 1.319444199secs
> v1 'master::call::GetMetrics' application/x-protobuf response took 1.257644596secs
> v1 'master::call::GetMetrics' application/json response took 1.527225235secs
> [       OK ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/1
(6553 ms)
> [ RUN      ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/2
> Test setup: 1 agents with a total of 10005 frameworks
> unversioned /metrics/snapshot' response took 15.479365874secs
> v1 'master::call::GetMetrics' application/x-protobuf response took 14.542866983secs
> v1 'master::call::GetMetrics' application/json response took 18.05492789secs
> [       OK ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/2
(75455 ms)
> [ RUN      ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/3
> Test setup: 1 agents with a total of 20005 frameworks
> unversioned /metrics/snapshot' response took 31.908301664secs
> v1 'master::call::GetMetrics' application/x-protobuf response took 32.128689785secs
> v1 'master::call::GetMetrics' application/json response took 33.669376185secs
> [       OK ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/3
(150440 ms)
> ```
> 
> WITH per-framework metrics, AFTER optimizations:
> ```
> [ RUN      ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/0
> Test setup: 1 agents with a total of 105 frameworks
> unversioned /metrics/snapshot' response took 104.577895ms
> v1 'master::call::GetMetrics' application/x-protobuf response took 74.262533ms
> v1 'master::call::GetMetrics' application/json response took 100.218618ms
> [       OK ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/0
(562 ms)
> [ RUN      ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/1
> Test setup: 1 agents with a total of 1005 frameworks
> unversioned /metrics/snapshot' response took 921.175877ms
> v1 'master::call::GetMetrics' application/x-protobuf response took 780.277639ms
> v1 'master::call::GetMetrics' application/json response took 1.168651111secs
> [       OK ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/1
(5424 ms)
> [ RUN      ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/2
> Test setup: 1 agents with a total of 10005 frameworks
> unversioned /metrics/snapshot' response took 10.2413387secs
> v1 'master::call::GetMetrics' application/x-protobuf response took 9.407992945secs
> v1 'master::call::GetMetrics' application/json response took 10.582584848secs
> [       OK ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/2
(57206 ms)
> [ RUN      ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/3
> Test setup: 1 agents with a total of 20005 frameworks
> unversioned /metrics/snapshot' response took 19.930542079secs
> v1 'master::call::GetMetrics' application/x-protobuf response took 20.318739763secs
> v1 'master::call::GetMetrics' application/json response took 22.853630899secs
> [       OK ] AgentFrameworkTaskCountContentType/MasterMetricsQuery_BENCHMARK_Test.GetMetrics/3
(116363 ms)
> ```
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


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