-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(benchmark): use grpc.SharedBufferPool for grpc.DialOption (#718)
### What this PR does When a client library parses incoming gRPC messages, it allocates new buffers frequently. This can result in the creation of a large number of heap objects. However, gRPC offers an experimental feature called the shared buffer pool that can be used to address this issue. This pull request (PR) aims to optimize the gRPC receiving path using the shared buffer pool. Various experiments have shown that this optimization leads to a decrease in CPU time of runtime.gcBgMarkWorkers, depending on the workload. Since the shared buffer pool is experimental, it is applied only to the benchmark. Refs: - <https://pkg.go.dev/google.golang.org/[email protected]/experimental#WithRecvBufferPool> - <https://pkg.go.dev/google.golang.org/[email protected]#SharedBufferPool>
- Loading branch information
Showing
4 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
vendor/google.golang.org/grpc/experimental/experimental.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters