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

(Updated Aug. 2, 2018, 9:43 p.m.)


Review request for James Peach.


Repository: mesos


Description
-------

There's only a single consumer, so we don't need to exchange
in dequeue. Testing shows that a load/store pair is much
more efficient, as it needs fewer CPU cycles. Especially
in the empty queue case, where the store does not have to
be executed at all.


Diffs
-----

  3rdparty/libprocess/src/mpsc_linked_queue.hpp fc55d4389 
  3rdparty/libprocess/src/tests/benchmarks.cpp 0b94aaf4e 


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


Testing
-------

Make check and benchmarks.

Benchmark results:

Exchange (before):

[=======] Running 3 tests from 1 test case.
[-------] Global test environment set-up.
[-------] 3 tests from ProcessTest
[ RUN   ] ProcessTest.Process_BENCHMARK_MpscLinkedQueue
Estimated producer throughput (7 threads): 38741698.929628 op/s
Estimated consumer throughput: 15783395.811778 op/s
Estimated total throughput: 54525094.741406 op/s
[    OK ] ProcessTest.Process_BENCHMARK_MpscLinkedQueue (4435 ms)
[ RUN   ] ProcessTest.Process_BENCHMARK_MpscLinkedQueueEmpty
Estimated consumer throughput: 182175973.774530 op/s
[    OK ] ProcessTest.Process_BENCHMARK_MpscLinkedQueueEmpty (5489 ms)
[ RUN   ] ProcessTest.Process_BENCHMARK_MpscLinkedQueueNonContendedRead
Estimated producer throughput (7 threads): 41807291.688699 op/s
Estimated consumer throughput: 21925675.985841 op/s
Estimated total throughput: 63732967.674541 op/s


Load/Store (after):

[=======] Running 3 tests from 1 test case.
[-------] Global test environment set-up.
[-------] 3 tests from ProcessTest
[ RUN   ] ProcessTest.Process_BENCHMARK_MpscLinkedQueue
Estimated producer throughput (7 threads): 39972854.982381 op/s
Estimated consumer throughput: 18090177.075559 op/s
Estimated total throughput: 58063032.057939 op/s
[    OK ] ProcessTest.Process_BENCHMARK_MpscLinkedQueue (3870 ms)
[ RUN   ] ProcessTest.Process_BENCHMARK_MpscLinkedQueueEmpty
Estimated consumer throughput: 1457824631.198832 op/s
[    OK ] ProcessTest.Process_BENCHMARK_MpscLinkedQueueEmpty (686 ms)
[ RUN   ] ProcessTest.Process_BENCHMARK_MpscLinkedQueueNonContendedRead
Estimated producer throughput (7 threads): 48031578.693516 op/s
Estimated consumer throughput: 25242881.515617 op/s
Estimated total throughput: 73274460.209133 op/s


File Attachments (updated)
----------------

mpsc-load-store.patch
  
https://reviews.apache.org/media/uploaded/files/2018/08/02/b8bd71a1-a1c7-47b1-beae-dc9f522ae192__mpsc-load-store.patch


Thanks,

Dario Rexin

Reply via email to