From 53d1f23a272376126aacb66cc0ce490a64ee3818 Mon Sep 17 00:00:00 2001 From: Doug Fawley Date: Mon, 14 Aug 2023 09:05:30 -0700 Subject: [PATCH] benchmark: update proper benchmark binary to use larger buffers (#6537) --- benchmark/worker/benchmark_client.go | 5 ++++- benchmark/worker/benchmark_server.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/benchmark/worker/benchmark_client.go b/benchmark/worker/benchmark_client.go index cc1af4f418a5..bd8a6e9ee49f 100644 --- a/benchmark/worker/benchmark_client.go +++ b/benchmark/worker/benchmark_client.go @@ -116,7 +116,10 @@ func setupClientEnv(config *testpb.ClientConfig) { // It returns the connections and corresponding function to close them. // It returns non-nil error if there is anything wrong. func createConns(config *testpb.ClientConfig) ([]*grpc.ClientConn, func(), error) { - var opts []grpc.DialOption + opts := []grpc.DialOption{ + grpc.WithWriteBufferSize(128 * 1024), + grpc.WithReadBufferSize(128 * 1024), + } // Sanity check for client type. switch config.ClientType { diff --git a/benchmark/worker/benchmark_server.go b/benchmark/worker/benchmark_server.go index f3ae4d08d836..01b3a5ce8a9f 100644 --- a/benchmark/worker/benchmark_server.go +++ b/benchmark/worker/benchmark_server.go @@ -80,7 +80,10 @@ func startBenchmarkServer(config *testpb.ServerConfig, serverPort int) (*benchma } runtime.GOMAXPROCS(numOfCores) - var opts []grpc.ServerOption + opts := []grpc.ServerOption{ + grpc.WriteBufferSize(128 * 1024), + grpc.ReadBufferSize(128 * 1024), + } // Sanity check for server type. switch config.ServerType {