mirror of https://github.com/grpc/grpc.git
We create a mdelem based on the default authority value for every call in `authority_start_transport_stream_op_batch()`. Since the key and value are identical for all calls on channels of a given process, they all map to the same shard of interned mdelem, creating a signficant contention on the mutex of that shard. This is observable in the profiles we have 1000s of connections between two hosts, exchanging a high rate of RPCs. Instead create the default mdelem and cache it in channel_data. Simply ref this mdelem in `authority_start_transport_stream_op_batch()`. This commit eliminates a signficant contention (2s in a 30s profile) on client side.pull/17776/head
parent
3278bdceda
commit
eb40dafe41
1 changed files with 5 additions and 2 deletions
Loading…
Reference in new issue