grpc / grpc/grpc-java

Netty streams should reduce the capacity of pooled buffers passed to sendFrame

オープン
#452 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
performance
主要言語
Java
スター
12.1k
フォーク
4k
平均マージ
2日 17時間
マージ済み PR(30日)
37

説明

When a small write and flush is passed through the framer we hold the full 4k of the buffer until the write completes. By reducing the capacity of a pool direct buffer to the readably byte limit we immediately release the unwritten portion of the buffer back to the pool.

This may or may not have an impact on performance and utility should be evaluated by bencmarking. It may improve performance by making more bytes available to thread-local allocation. The most likely benchmarks to be impacted would be streaming ones that write and flush many messages in a tight loop as it would alleviate buffer-arena locks.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、小さな書き込みと flush を処理する Netty の framer パスを特定し、プールされた direct buffer と読み取り可能バイト数の上限に注目します。タイトなループ内で多数のメッセージを書き込んで flush するストリーミングワークロードをベンチマークし、未書き込みの buffer 部分が pool に返却される際に行われる処理と、パフォーマンスへの影響を測定することを検討します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
backend, performance
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。