configure number of used hardware threads for synchronous gRPC C++ server

41 views
Skip to first unread message

Christina Müller

unread,
Jul 5, 2019, 11:22:46 AM7/5/19
to grpc.io
Hi @all,

I have a gRPC application with the following setup:
- bidirectional streaming
- synchronous gRPC server in C++
- gRPC client in go

The server is running in an environment with 2 CPUs:

I have run my application once with NUM_CQS equals to 1 and the second time with NUM_CQS equals 2:
  builder.SetSyncServerOption(ServerBuilder::SyncServerOption::NUM_CQS, 2);
  builder.SetSyncServerOption(ServerBuilder::SyncServerOption::MIN_POLLERS, 1);
  builder.SetSyncServerOption(ServerBuilder::SyncServerOption::MAX_POLLERS, 1);
    builder.SetSyncServerOption(ServerBuilder::SyncServerOption::CQ_TIMEOUT_MSEC, 1000000000);

For the same number of clients making gRPC requests in parallel, there is no difference in throughput for the two runs. Although I would expect that with setting 2, we would have higher throughput.
Is my expectation wrong? How can I control how many cores are used by the synchronous gRPC server?

Thank for inputs!
Reply all
Reply to author
Forward
0 new messages