Skip to content

Commit 7d6fc7b

Browse files
committed
PublisherAsBlockingIterable LinkedBlockingQueue -> SpscBlockingQueue
Motivation: LinkedBlockingQueue allows for multiple producers and multiple consumers. It uses LockSupport park in offer and unpark in take. LockSupport unpark on the EventLoop thread has been shown to impact throughput during benchmarks. SpscBlockingQueue (yield_count == 1) ``` Running 30s test @ http://localhost:8080/medium, using 'ServiceTalkGrpcBlockingClientStrAgg' client 1024 threads and 1024 connections Thread Stats Avg Stdev Max +/- Stdev Latency - - - - Req/Sec 0.01k - 0.01k - 275243 requests in 30s Requests/sec: 9174.77 Transfer/sec: - OK: 275243 KO: 0 ``` SpscBlockingQueue (yield_count == 2) ``` Running 30s test @ http://localhost:8080/medium, using 'ServiceTalkGrpcBlockingClientStrAgg' client 1024 threads and 1024 connections Thread Stats Avg Stdev Max +/- Stdev Latency - - - - Req/Sec 0.01k - 0.01k - 319577 requests in 30s Requests/sec: 10652.57 Transfer/sec: - OK: 319577 KO: 0 ``` LinkedBlockingQueue ``` Running 30s test @ http://localhost:8080/medium, using 'ServiceTalkGrpcBlockingClientStrAgg' client 1024 threads and 1024 connections Thread Stats Avg Stdev Max +/- Stdev Latency - - - - Req/Sec 0.01k - 0.01k - 256778 requests in 30s Requests/sec: 8559.27 Transfer/sec: - OK: 256778 KO: 0 ```
1 parent b1a5c53 commit 7d6fc7b

File tree

1 file changed

+423
-4
lines changed

1 file changed

+423
-4
lines changed

0 commit comments

Comments
 (0)