Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-29 Thread Benjamin Mahler

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


Fix it, then Ship it!




Thanks! Will get this committed shortly.


src/tests/resources_tests.cpp
Lines 4000-4001 (patched)


Generally we should write expressions like these in a manner that enables 
moves:

```
*ranges1.add_range() = createRange(port1Index, port1Index + stride);
```

The assignment operator has an rvalue overload but CopyFrom does not.


- Benjamin Mahler


On June 29, 2018, 12:38 a.m., Meng Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67590/
> ---
> 
> (Updated June 29, 2018, 12:38 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-8989
> https://issues.apache.org/jira/browse/MESOS-8989
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> Also removed the current range benchmark which could produce
> misleading results for subtraction (See MESOS-8989).
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 
> 
> 
> Diff: https://reviews.apache.org/r/67590/diff/4/
> 
> 
> Testing
> ---
> 
> Build with `-O2` optimization, ran on a multicore machine with peak frequency 
> at 2.2GHz:
> 
> Took 1.504607ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 7.119324ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 2.991275ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 8.681909ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> 
> Took 14.814339ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 80.680714ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 25.640379ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 89.253517ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> 
> Took 234.144019ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 892.338197ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 317.301614ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 1.024019112secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>



Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-29 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [67590]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On June 29, 2018, 12:38 a.m., Meng Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67590/
> ---
> 
> (Updated June 29, 2018, 12:38 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-8989
> https://issues.apache.org/jira/browse/MESOS-8989
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> Also removed the current range benchmark which could produce
> misleading results for subtraction (See MESOS-8989).
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 
> 
> 
> Diff: https://reviews.apache.org/r/67590/diff/4/
> 
> 
> Testing
> ---
> 
> Build with `-O2` optimization, ran on a multicore machine with peak frequency 
> at 2.2GHz:
> 
> Took 1.504607ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 7.119324ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 2.991275ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 8.681909ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> 
> Took 14.814339ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 80.680714ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 25.640379ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 89.253517ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> 
> Took 234.144019ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 892.338197ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 317.301614ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 1.024019112secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>



Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-28 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 67590 was successfully built and tested.

Reviews applied: `['67590']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67590

- Mesos Reviewbot Windows


On June 28, 2018, 5:38 p.m., Meng Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67590/
> ---
> 
> (Updated June 28, 2018, 5:38 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-8989
> https://issues.apache.org/jira/browse/MESOS-8989
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> Also removed the current range benchmark which could produce
> misleading results for subtraction (See MESOS-8989).
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 
> 
> 
> Diff: https://reviews.apache.org/r/67590/diff/4/
> 
> 
> Testing
> ---
> 
> Build with `-O2` optimization, ran on a multicore machine with peak frequency 
> at 2.2GHz:
> 
> Took 1.504607ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 7.119324ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 2.991275ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 8.681909ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> 
> Took 14.814339ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 80.680714ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 25.640379ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 89.253517ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> 
> Took 234.144019ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 892.338197ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 317.301614ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 1.024019112secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>



Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-28 Thread Meng Zhu


> On June 28, 2018, 2:04 p.m., Benjamin Mahler wrote:
> > Looks pretty good! The only thing that feels a little off is the size 
> > parameterization. It currently represents the number of ranges, but I 
> > imagine other benchmarks might not want to use that as the "size" (vs the 
> > overall range size or number of items). I think it's fine for now but 
> > probably warrants some explanation (e.g. we choose to parameterize on 
> > number of subranges becacuse it's a dominant factor in the performance of 
> > operations). What do you think?

Sounds good. Comment added.


> On June 28, 2018, 2:04 p.m., Benjamin Mahler wrote:
> > src/tests/resources_tests.cpp
> > Lines 3981 (patched)
> > 
> >
> > Oh, I guess I misunderstood this value, it's not the number of items 
> > but rather the number of sub-ranges? Seems like this needs to at least be 
> > documented? I guess this means 10,000 represents far more than 10,000 ports 
> > in the overlapping benchmark? Probably warrants writing it down?

Correct. Added comment.


- Meng


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


On June 28, 2018, 5:38 p.m., Meng Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67590/
> ---
> 
> (Updated June 28, 2018, 5:38 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-8989
> https://issues.apache.org/jira/browse/MESOS-8989
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> Also removed the current range benchmark which could produce
> misleading results for subtraction (See MESOS-8989).
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 
> 
> 
> Diff: https://reviews.apache.org/r/67590/diff/4/
> 
> 
> Testing
> ---
> 
> Build with `-O2` optimization, ran on a multicore machine with peak frequency 
> at 2.2GHz:
> 
> Took 1.504607ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 7.119324ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 2.991275ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> Took 8.681909ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
> 
> Took 14.814339ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 80.680714ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 25.640379ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> Took 89.253517ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
> 
> Took 234.144019ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 892.338197ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 317.301614ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> Took 1.024019112secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
> sub-ranges
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>



Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-28 Thread Meng Zhu

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

(Updated June 28, 2018, 5:38 p.m.)


Review request for mesos and Benjamin Mahler.


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


Repository: mesos


Description
---

See summary.

Also removed the current range benchmark which could produce
misleading results for subtraction (See MESOS-8989).


Diffs (updated)
-

  src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 


Diff: https://reviews.apache.org/r/67590/diff/3/

Changes: https://reviews.apache.org/r/67590/diff/2-3/


Testing (updated)
---

Build with `-O2` optimization, ran on a multicore machine with peak frequency 
at 2.2GHz:

Took 1.504607ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
Took 7.119324ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
Took 2.991275ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges
Took 8.681909ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
21-26...91-96] and ports:[3-8, 13-18, 23-28..., 93-98] with 10 sub-ranges

Took 14.814339ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
Took 80.680714ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
Took 25.640379ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges
Took 89.253517ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
21-26...991-996] and ports:[3-8, 13-18, 23-28..., 993-998] with 100 sub-ranges

Took 234.144019ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
sub-ranges
Took 892.338197ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
sub-ranges
Took 317.301614ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
sub-ranges
Took 1.024019112secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
21-26...9991-9996] and ports:[3-8, 13-18, 23-28..., 9993-9998] with 1000 
sub-ranges


Thanks,

Meng Zhu



Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-28 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 67590 was successfully built and tested.

Reviews applied: `['67590']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67590

- Mesos Reviewbot Windows


On June 28, 2018, 7:34 p.m., Meng Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67590/
> ---
> 
> (Updated June 28, 2018, 7:34 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-8989
> https://issues.apache.org/jira/browse/MESOS-8989
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> Also removed the current range benchmark which could produce
> misleading results for subtraction (See MESOS-8989).
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 
> 
> 
> Diff: https://reviews.apache.org/r/67590/diff/2/
> 
> 
> Testing
> ---
> 
> Build with `-O2` optimization, ran on a multicore machine with peak frequency 
> at 2.2GHz:
> 
> Took 23.31231ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 85.494021ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 45.536174ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 108.754885ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> 
> Took 309.716888ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 917.667222ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 502.702844ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 1.178407509secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> 
> Took 3.144658342secs to perform 1000 'a += b' operations on ports:[1-6, 
> 11-16, 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> Took 9.086052071secs to perform 1000 'a -= b' operations on ports:[1-6, 
> 11-16, 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> Took 4.518318425secs to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> Took 10.604580315secs to perform 1000 'a - b' operations on ports:[1-6, 
> 11-16, 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>



Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-28 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [67590]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On June 28, 2018, 7:34 p.m., Meng Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67590/
> ---
> 
> (Updated June 28, 2018, 7:34 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-8989
> https://issues.apache.org/jira/browse/MESOS-8989
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> Also removed the current range benchmark which could produce
> misleading results for subtraction (See MESOS-8989).
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 
> 
> 
> Diff: https://reviews.apache.org/r/67590/diff/2/
> 
> 
> Testing
> ---
> 
> Build with `-O2` optimization, ran on a multicore machine with peak frequency 
> at 2.2GHz:
> 
> Took 23.31231ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 85.494021ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 45.536174ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 108.754885ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> 
> Took 309.716888ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 917.667222ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 502.702844ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 1.178407509secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> 
> Took 3.144658342secs to perform 1000 'a += b' operations on ports:[1-6, 
> 11-16, 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> Took 9.086052071secs to perform 1000 'a -= b' operations on ports:[1-6, 
> 11-16, 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> Took 4.518318425secs to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> Took 10.604580315secs to perform 1000 'a - b' operations on ports:[1-6, 
> 11-16, 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>



Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-28 Thread Benjamin Mahler

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


Fix it, then Ship it!




Looks pretty good! The only thing that feels a little off is the size 
parameterization. It currently represents the number of ranges, but I imagine 
other benchmarks might not want to use that as the "size" (vs the overall range 
size or number of items). I think it's fine for now but probably warrants some 
explanation (e.g. we choose to parameterize on number of subranges becacuse 
it's a dominant factor in the performance of operations). What do you think?


src/tests/resources_tests.cpp
Lines 3981 (patched)


Oh, I guess I misunderstood this value, it's not the number of items but 
rather the number of sub-ranges? Seems like this needs to at least be 
documented? I guess this means 10,000 represents far more than 10,000 ports in 
the overlapping benchmark? Probably warrants writing it down?



src/tests/resources_tests.cpp
Lines 3992-3993 (patched)


Can you show the end as well?

```
ports1 = [1-6, 11-16, 21-26, ..., 1001-1006] (100 sub-ranges of [1-1006]).
```

Looks like the 100 size case is already pretty representative of port 
ranges, and 1000 would be a range of ~ [1-1], that makes 10,000 beyond what 
we would be interested in benchmarking since it maps to ~ [1-10]?



src/tests/resources_tests.cpp
Lines 4026 (patched)


"size" seems ambiguous here, it represents the number of subranges but not 
the number of items or overall range bounds, so we should probably remove any 
ambiguity in the wording


- Benjamin Mahler


On June 28, 2018, 7:34 p.m., Meng Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67590/
> ---
> 
> (Updated June 28, 2018, 7:34 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-8989
> https://issues.apache.org/jira/browse/MESOS-8989
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> Also removed the current range benchmark which could produce
> misleading results for subtraction (See MESOS-8989).
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 
> 
> 
> Diff: https://reviews.apache.org/r/67590/diff/2/
> 
> 
> Testing
> ---
> 
> Build with `-O2` optimization, ran on a multicore machine with peak frequency 
> at 2.2GHz:
> 
> Took 23.31231ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 85.494021ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 45.536174ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 108.754885ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> 
> Took 309.716888ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 917.667222ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 502.702844ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 1.178407509secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> 
> Took 3.144658342secs to perform 1000 'a += b' operations on ports:[1-6, 
> 11-16, 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> Took 9.086052071secs to perform 1000 'a -= b' operations on ports:[1-6, 
> 11-16, 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> Took 4.518318425secs to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> Took 10.604580315secs to perform 1000 'a - b' operations on ports:[1-6, 
> 11-16, 21-26... and ports:[3-8, 13-18, 23-28... with size 1
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>



Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-28 Thread Meng Zhu

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

(Updated June 28, 2018, 12:34 p.m.)


Review request for mesos and Benjamin Mahler.


Changes
---

Patch and test results updated.


Summary (updated)
-

Added a dedicated benchmark for overlapping range resources.


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


Repository: mesos


Description
---

See summary.

Also removed the current range benchmark which could produce
misleading results for subtraction (See MESOS-8989).


Diffs (updated)
-

  src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 


Diff: https://reviews.apache.org/r/67590/diff/2/

Changes: https://reviews.apache.org/r/67590/diff/1-2/


Testing (updated)
---

Build with `-O2` optimization, ran on a multicore machine with peak frequency 
at 2.2GHz:

Took 23.31231ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 100
Took 85.494021ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 100
Took 45.536174ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 100
Took 108.754885ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 100

Took 309.716888ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 1000
Took 917.667222ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 1000
Took 502.702844ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 1000
Took 1.178407509secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 1000

Took 3.144658342secs to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 1
Took 9.086052071secs to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 1
Took 4.518318425secs to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 1
Took 10.604580315secs to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
21-26... and ports:[3-8, 13-18, 23-28... with size 1


Thanks,

Meng Zhu



Re: Review Request 67590: Added a dedicated benchmark for overlapping range resources.

2018-06-28 Thread Meng Zhu


> On June 27, 2018, 6:29 p.m., Benjamin Mahler wrote:
> > Great to see this!
> > 
> > Can you update the testing done to say whether this was measured with an 
> > optimized build? If not, can you add the optimized build measurements?

Updated numbers with optimized build


> On June 27, 2018, 6:29 p.m., Benjamin Mahler wrote:
> > src/tests/resources_tests.cpp
> > Lines 3944 (patched)
> > 
> >
> > The default port ranges in mesos is 31000-32000, and a user could set 
> > it to something like 1-32000, so we probably also want to test in the 
> > tens of thousands worst case.
> > 
> > E.g. 100, 1000, 1

Updated the number.


> On June 27, 2018, 6:29 p.m., Benjamin Mahler wrote:
> > src/tests/resources_tests.cpp
> > Lines 3947 (patched)
> > 
> >
> > After figuring out what ranges are used, it looks like we probably want 
> > to specialize this name? E.g. ArithmeticOverlapping

Done.


> On June 27, 2018, 6:29 p.m., Benjamin Mahler wrote:
> > src/tests/resources_tests.cpp
> > Lines 3949-3970 (patched)
> > 
> >
> > It's hard to understand what this is doing, can you describe what ports 
> > 1 and 2 look like or what the idea is here? Am I reading right?
> > 
> > ports1 = [1-6, 11-16, 21-26, ...]
> > ports2 = [3-8, 13-18, 23-28, ...]
> > 
> > It looks like there's a lot of overlap in the ranges? It's probably 
> > worth describing why we do this (is it trying to match total-allocated?). 
> > We probably also want to name the test with "overlap" to clarify the 
> > relationship between port ranges in this test (vs say, ranges with no 
> > overlap).

Done. The motivation for this benchmark was to find out the performance 
difference between addition and subtraction. The partial overlapping pattern 
represents a worst-case that is comparable for both addition and subtraction.

It sounds like a good idea to test `total - allocated` which is probably the 
most common use case. I think it will be like one single big interval subtracts 
many small (allocated) intervals, though it no longer make sense to compare 
addition and subtraction.


> On June 27, 2018, 6:29 p.m., Benjamin Mahler wrote:
> > src/tests/resources_tests.cpp
> > Lines 3954-3959 (patched)
> > 
> >
> > Looks like this can be:
> > 
> > ```
> > ports1 += createPorts(createRange(port1Index, port1Index + stride);
> > ```
> > 
> > 
> > https://github.com/apache/mesos/blob/1.6.0/src/tests/resources_utils.hpp#L45-L62

Thanks. `createPorts` takes in ranges. But made similar improvements on the 
readability.


- Meng


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


On June 28, 2018, 12:34 p.m., Meng Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67590/
> ---
> 
> (Updated June 28, 2018, 12:34 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-8989
> https://issues.apache.org/jira/browse/MESOS-8989
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> Also removed the current range benchmark which could produce
> misleading results for subtraction (See MESOS-8989).
> 
> 
> Diffs
> -
> 
>   src/tests/resources_tests.cpp 0095b945ebfd9be52162547f3999826c8cc33f87 
> 
> 
> Diff: https://reviews.apache.org/r/67590/diff/2/
> 
> 
> Testing
> ---
> 
> Build with `-O2` optimization, ran on a multicore machine with peak frequency 
> at 2.2GHz:
> 
> Took 23.31231ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 85.494021ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 45.536174ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> Took 108.754885ms to perform 1000 'a - b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 100
> 
> Took 309.716888ms to perform 1000 'a += b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 917.667222ms to perform 1000 'a -= b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size 1000
> Took 502.702844ms to perform 1000 'a + b' operations on ports:[1-6, 11-16, 
> 21-26... and ports:[3-8, 13-18, 23-28... with size