grpc/test/cpp/microbenchmarks
AJ Heller 3fb738b9b1
[EventEngine] Implement work-stealing in the EventEngine ThreadPool (#32869)
This PR implements a work-stealing thread pool for use inside
EventEngine implementations. Because of historical risks here, I've
guarded the new implementation behind an experiment flag:
`GRPC_EXPERIMENTS=work_stealing`. Current default behavior is the
original thread pool implementation.

Benchmarks look very promising:

```
bazel test \
--test_timeout=300 \
--config=opt -c opt \
--test_output=streamed \
--test_arg='--benchmark_format=csv' \
--test_arg='--benchmark_min_time=0.15' \
--test_arg='--benchmark_filter=_FanOut' \
--test_arg='--benchmark_repetitions=15' \
--test_arg='--benchmark_report_aggregates_only=true' \
test/cpp/microbenchmarks:bm_thread_pool
```

2023-05-04: `bm_thread_pool` benchmark results on my local machine (64
core ThreadRipper PRO 3995WX, 256GB memory), comparing this PR to
master:


![image](https://user-images.githubusercontent.com/295906/236315252-35ed237e-7626-486c-acfa-71a36f783d22.png)

2023-05-04: `bm_thread_pool` benchmark results in the Linux RBE
environment (unsure of machine configuration, likely small), comparing
this PR to master.


![image](https://user-images.githubusercontent.com/295906/236317164-2c5acbeb-fdac-4737-9b2d-4df9c41cb825.png)

---------

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-05-08 13:38:23 -07:00
..
BUILD [EventEngine] Implement work-stealing in the EventEngine ThreadPool (#32869) 2023-05-08 13:38:23 -07:00
bm_alarm.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_arena.cc [arena] Fix ABA problem in pooled allocation (#32336) 2023-02-09 18:06:19 -08:00
bm_basic_work_queue.cc [EventEngine] Implement work-stealing in the EventEngine ThreadPool (#32869) 2023-05-08 13:38:23 -07:00
bm_byte_buffer.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_call_create.cc Reland "[promises] Convert call to a party" (#32651)" (#32653) 2023-03-27 14:02:36 -07:00
bm_callback_streaming_ping_pong.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_callback_unary_ping_pong.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_channel.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_channel_args.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_chttp2_hpack.cc Add random early rejection for metadata (#32600) 2023-03-27 14:13:20 -07:00
bm_chttp2_transport.cc [cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757) 2023-01-11 08:50:32 -08:00
bm_closure.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_cq.cc [cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757) 2023-01-11 08:50:32 -08:00
bm_cq_multiple_threads.cc [cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757) 2023-01-11 08:50:32 -08:00
bm_event_engine_run.cc [fixup] EventEngine Nomenclature (#32195) 2023-01-25 09:31:46 -08:00
bm_exec_ctx.cc More changes (#31194) 2022-09-30 17:10:01 -07:00
bm_fullstack_streaming_ping_pong.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_fullstack_streaming_pump.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_fullstack_unary_ping_pong.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_huffman_decode.cc [chttp2] Eliminate legacy huffman decoder (#32289) 2023-02-07 19:53:41 -08:00
bm_opencensus_plugin.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
bm_pollset.cc [cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757) 2023-01-11 08:50:32 -08:00
bm_thread_pool.cc [EventEngine] Implement work-stealing in the EventEngine ThreadPool (#32869) 2023-05-08 13:38:23 -07:00
callback_streaming_ping_pong.h Fix include guards for src/ and test/ directories (#32167) 2023-01-20 16:27:27 -08:00
callback_test_service.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
callback_test_service.h Fix include guards for src/ and test/ directories (#32167) 2023-01-20 16:27:27 -08:00
callback_unary_ping_pong.h Fix include guards for src/ and test/ directories (#32167) 2023-01-20 16:27:27 -08:00
fullstack_context_mutators.h Fix include guards for src/ and test/ directories (#32167) 2023-01-20 16:27:27 -08:00
fullstack_fixtures.h Fix include guards for src/ and test/ directories (#32167) 2023-01-20 16:27:27 -08:00
fullstack_streaming_ping_pong.h Fix include guards for src/ and test/ directories (#32167) 2023-01-20 16:27:27 -08:00
fullstack_streaming_pump.h Fix include guards for src/ and test/ directories (#32167) 2023-01-20 16:27:27 -08:00
fullstack_unary_ping_pong.h Fix include guards for src/ and test/ directories (#32167) 2023-01-20 16:27:27 -08:00
grpc_benchmark_config.bzl Speed up microbenchmark tests (#27584) 2021-10-05 07:09:02 -07:00
helpers.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
helpers.h Fix include guards for src/ and test/ directories (#32167) 2023-01-20 16:27:27 -08:00
noop-benchmark.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00