grpc / grpc/grpc-java

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

Aperta
#452 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
performance
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.