PublisherAsBlockingIterable LinkedBlockingQueue -> SpscBlockingQueue#2384
Draft
Scottmitch wants to merge 1 commit intoapple:mainfrom
Draft
PublisherAsBlockingIterable LinkedBlockingQueue -> SpscBlockingQueue#2384Scottmitch wants to merge 1 commit intoapple:mainfrom
Scottmitch wants to merge 1 commit intoapple:mainfrom
Conversation
b5163cf to
0a1fbdd
Compare
24eb4f4 to
091d729
Compare
Scottmitch
commented
Oct 3, 2022
6429556 to
6a091a8
Compare
mgodave
reviewed
Oct 3, 2022
4c8807d to
349f085
Compare
Member
Author
|
LinkedTransferQueue also does |
f698774 to
d46403b
Compare
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 -
291045 requests in 30s
Requests/sec: 9701.50
Transfer/sec: -
OK: 291045
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 -
328586 requests in 30s
Requests/sec: 10952.87
Transfer/sec: -
OK: 328586
KO: 0
```
LinkedTransferQueue
```
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 -
289396 requests in 30s
Requests/sec: 9646.53
Transfer/sec: -
OK: 289396
KO: 0
```
6272a95 to
1cb8031
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
SpscBlockingQueue (yield_count == 2)
LinkedTransferQueue