mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Review Request 60791: Add fetcher cache space usage metrics.
Date Wed, 19 Jul 2017 00:25:06 GMT


> On July 18, 2017, 9:16 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/fetcher.cpp
> > Lines 266-267 (original), 266-275 (patched)
> > <https://reviews.apache.org/r/60791/diff/3/?file=1778079#file1778079line266>
> >
> >     Outside the fetcher I think we use a convention like this: https://github.com/apache/mesos/blob/d5b85d2b9063b5fb4a40108ec4801cc5ed2f5155/src/master/registrar.cpp#L146-L195
> >     
> >     i.e., 
> >     
> >     - Group metrics in a `Metrics` nested class. (Later when you have more of them
and would like to pull them out into a different file you can easily do so).
> >     - Snake casing which is consistent with the metric name.
> >     - For gauges, defer to an internal private handler prefixed by a `_`.
> >     
> >     Any reason to diverge?
> >     
> >     (Aside from `cache_size_total` which is const)

This specifically doesn't `defer` due to the performance overhead of that, compared to just
making a member function call.


> On July 18, 2017, 9:16 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/fetcher.cpp
> > Lines 272-275 (patched)
> > <https://reviews.apache.org/r/60791/diff/3/?file=1778079#file1778079line272>
> >
> >     Aside from styling/convention, would this require defer?

No, this is avoiding the defer on purpose.


> On July 18, 2017, 9:16 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/fetcher.cpp
> > Lines 293-295 (patched)
> > <https://reviews.apache.org/r/60791/diff/3/?file=1778079#file1778079line293>
> >
> >     Why await?

This synchronizes the metric removal so that it can't be evaluated after the process has been
destroyed.


> On July 18, 2017, 9:16 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/fetcher_process.hpp
> > Lines 147-148 (patched)
> > <https://reviews.apache.org/r/60791/diff/3/?file=1778080#file1778080line147>
> >
> >     If these are used only for monitoring, should we just follow the convention
mentioned above and make them private?

We already had `availableSpace()`, so this extends that to a consistent API family.


- James


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


On July 18, 2017, 2:13 a.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60791/
> -----------------------------------------------------------
> 
> (Updated July 18, 2017, 2:13 a.m.)
> 
> 
> Review request for mesos, Joseph Wu and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-7782
>     https://issues.apache.org/jira/browse/MESOS-7782
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add fetcher metrics to track the (constant) size of the cache size
> and the (varying) amount of cache space use. The cache size is
> published as `containerizer/fetcher/cache_size_total` and the used
> space is `containerizer/fetcher/cache_size_used`. Both of these
> metrics are in MB to be consistent with other disk space metrics.
> We manually convert to fractional MB so that small amounts of space
> usage don't get truncated away.
> 
> 
> Diffs
> -----
> 
>   docs/monitoring.md 38b8093ef683b5de65cbfa5330a6bbd1c9e10f12 
>   src/slave/containerizer/fetcher.cpp 6a664e0657a19d27afac98fd5298d6a18aabe43f 
>   src/slave/containerizer/fetcher_process.hpp 3ed7dc9db5b64b72881249767c0356a3bc5370e7

>   src/tests/fetcher_cache_tests.cpp 1c654e511d2079de746ac97a2c2718e1b926768e 
> 
> 
> Diff: https://reviews.apache.org/r/60791/diff/3/
> 
> 
> Testing
> -------
> 
> make check (Fedora 26).
> 
> 
> Thanks,
> 
> James Peach
> 
>


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