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.

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
```
  • Loading branch information
Scottmitch committed Oct 26, 2022
1 parent 6e56db0 commit 1cb8031
Show file tree
Hide file tree
Showing 3 changed files with 417 additions and 4 deletions.
Loading

0 comments on commit 1cb8031

Please sign in to comment.