diff --git a/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs b/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs index 865556c2426..62a7347d420 100644 --- a/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs +++ b/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs @@ -76,6 +76,11 @@ namespace Grpc.IntegrationTesting private async Task RunAsync() { + // (ThreadPoolSize == ProcessorCount) gives best throughput in benchmarks + // and doesn't seem to harm performance even when server and client + // are running on the same machine. + GrpcEnvironment.SetThreadPoolSize(Environment.ProcessorCount); + string host = "0.0.0.0"; int port = options.DriverPort;