diff --git a/benchmark/worker/benchmark_client.go b/benchmark/worker/benchmark_client.go index 1a05ec0d..0067d5eb 100644 --- a/benchmark/worker/benchmark_client.go +++ b/benchmark/worker/benchmark_client.go @@ -69,6 +69,7 @@ func printClientConfig(config *testpb.ClientConfig) { // - core list grpclog.Printf(" * client type: %v (ignored, always creates sync client)", config.ClientType) grpclog.Printf(" * async client threads: %v (ignored)", config.AsyncClientThreads) + // TODO: use cores specified by CoreList when setting list of cores is supported in go. grpclog.Printf(" * core list: %v (ignored)", config.CoreList) grpclog.Printf(" - security params: %v", config.SecurityParams) @@ -87,6 +88,8 @@ func setupClientEnv(config *testpb.ClientConfig) { // TODO: Revisit this for the optimal default setup. if config.CoreLimit > 0 { runtime.GOMAXPROCS(int(config.CoreLimit)) + } else { + runtime.GOMAXPROCS(runtime.NumCPU()) } } diff --git a/benchmark/worker/benchmark_server.go b/benchmark/worker/benchmark_server.go index 5f4da0e6..0a928a11 100644 --- a/benchmark/worker/benchmark_server.go +++ b/benchmark/worker/benchmark_server.go @@ -70,6 +70,7 @@ func printServerConfig(config *testpb.ServerConfig) { // - core list grpclog.Printf(" * server type: %v (ignored, always starts sync server)", config.ServerType) grpclog.Printf(" * async server threads: %v (ignored)", config.AsyncServerThreads) + // TODO: use cores specified by CoreList when setting list of cores is supported in go. grpclog.Printf(" * core list: %v (ignored)", config.CoreList) grpclog.Printf(" - security params: %v", config.SecurityParams) @@ -86,8 +87,8 @@ func startBenchmarkServer(config *testpb.ServerConfig, serverPort int) (*benchma numOfCores := runtime.NumCPU() if config.CoreLimit > 0 { numOfCores = int(config.CoreLimit) - runtime.GOMAXPROCS(numOfCores) } + runtime.GOMAXPROCS(numOfCores) var opts []grpc.ServerOption