-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PublisherAsBlockingIterable LinkedBlockingQueue -> SpscBlockingQueue #2384
Draft
Scottmitch
wants to merge
1
commit into
apple:main
Choose a base branch
from
Scottmitch:spsc_blocking_queue
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Scottmitch
force-pushed
the
spsc_blocking_queue
branch
2 times, most recently
from
October 2, 2022 15:44
b5163cf
to
0a1fbdd
Compare
Scottmitch
changed the title
[wip] PublisherAsBlockingIterable LinkedBlockingQueue -> SpscBlockingQueue
PublisherAsBlockingIterable LinkedBlockingQueue -> SpscBlockingQueue
Oct 2, 2022
Scottmitch
force-pushed
the
spsc_blocking_queue
branch
2 times, most recently
from
October 3, 2022 04:57
24eb4f4
to
091d729
Compare
Scottmitch
commented
Oct 3, 2022
...-concurrent-api/src/main/java/io/servicetalk/concurrent/api/PublisherAsBlockingIterable.java
Outdated
Show resolved
Hide resolved
Scottmitch
force-pushed
the
spsc_blocking_queue
branch
from
October 3, 2022 15:50
6429556
to
6a091a8
Compare
mgodave
reviewed
Oct 3, 2022
...-concurrent-api/src/main/java/io/servicetalk/concurrent/api/PublisherAsBlockingIterable.java
Outdated
Show resolved
Hide resolved
Scottmitch
force-pushed
the
spsc_blocking_queue
branch
6 times, most recently
from
October 4, 2022 15:53
4c8807d
to
349f085
Compare
LinkedTransferQueue also does |
Scottmitch
force-pushed
the
spsc_blocking_queue
branch
4 times, most recently
from
October 6, 2022 05:56
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 ```
Scottmitch
force-pushed
the
spsc_blocking_queue
branch
from
October 26, 2022 17:35
6272a95
to
1cb8031
Compare
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