Excess contention in ExecutorService
- 主要言語
- Java
- スター
- 12.1k
- フォーク
- 4k
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 37
説明
When profiling a client with 200K active RPCs, there is a point of contention on the Executor. Each RPC gets its own SerializingExecutor, which executes work on an underlying executor. Currently, that executor is ThreadPoolExecutor in almost all cases, which itself has a BlockingQueue. That queue is heavily contended showing up at _minutes_ of wasted time:
```
141.17mins 79.41% 79.41% 141.22mins 79.44% java.util.concurrent.LinkedBlockingQueue.offer LinkedBlockingQueue.java
36.51mins 20.54% 99.95% 36.52mins 20.54% java.util.concurrent.LinkedBlockingQueue.take LinkedBlockingQueue.java
```
An idea to fix this is to have some sort of striping executor in order to prevent this contention from happening.
コントリビューションガイド
調査の方向性
まず、issue で説明されている SerializingExecutor と ThreadPoolExecutor のパスを調査します。これには、プロファイルに示されている BlockingQueue の競合も含まれます。範囲は、200K-RPC ワークロード向けの striping-executor アプローチを定義して評価することです。issue では、ファイル、テスト、またはより具体的な完了基準は指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- backend-api-design, performance
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100