Skip to content

Commit

Permalink
PublisherAsBlockingIterable LinkedBlockingQueue -> SpscBlockingQueue
Browse files Browse the repository at this point in the history
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.

Before:
```
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         -
  262338 requests in 30s
Requests/sec: 8744.60
Transfer/sec: -
OK: 262338
KO: 0
```

After:
```
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         -
  326478 requests in 30s
Requests/sec: 10882.60
Transfer/sec: -
OK: 326478
KO: 0
```
  • Loading branch information
Scottmitch committed Oct 3, 2022
1 parent 450096e commit 6a091a8
Showing 1 changed file with 421 additions and 4 deletions.
Loading

0 comments on commit 6a091a8

Please sign in to comment.