Baseline overhead for C++ server

108 views
Skip to first unread message

Amirsaman Memaripour

unread,
Sep 24, 2024, 1:11:21 PM9/24/24
to grpc.io
Hi folks,

Are there any published latency numbers for the baseline overhead of a C++ ping server, using gRPC's CQs? I'm primarily interested in the per request CPU overhead of gRPC's RPC stack on the server-side, and if there are studies on tuning the number of polling threads and CQs to optimize that cost and maximize throughput on a few CPU cores.

Amirsaman Memaripour

unread,
Oct 1, 2024, 4:44:25 PM10/1/24
to grpc.io
Pinging in case this didn't show up in your radar :)

veb...@google.com

unread,
Oct 3, 2024, 5:24:02 PM10/3/24
to grpc.io
https://grpc.io/docs/guides/benchmarking/ is what we have for this topic. You can get continuous benchmark data from https://grafana-dot-grpc-testing.appspot.com/?orgId=1

Amirsaman Memaripour

unread,
Oct 3, 2024, 6:21:34 PM10/3/24
to grpc.io
Thanks for sharing the link. I'm wondering if the issue referenced in this PR is addressed, and if the numbers reported for C++ are correct? In other words, should I expect ~260K QPS for running the streaming, secure `ping` benchmark against an 8 core server? If so, why is the C++ implementation not as efficient as the Go and Java?

Screenshot 2024-10-03 at 6.17.42 PM.png

veb...@google.com

unread,
Oct 3, 2024, 6:36:46 PM10/3/24
to grpc.io
Those numbers look correct to me.

FYI, We're actively working on C++ performance enhancements (namely EventEngine and Promise migration), and we anticipate seeing improvements once those are implemented. I'm hoping that those changes are complete some time next year.


Amirsaman Memaripour

unread,
Oct 3, 2024, 6:42:53 PM10/3/24
to grpc.io
Thanks again. Just to verify, we expect to see the C++ implementation to offer half of the throughput of the Go and Java implementations, providing a peak of 260K QPS on an 8 core server, correct?

Esun Kim

unread,
Oct 3, 2024, 6:55:07 PM10/3/24
to Amirsaman Memaripour, grpc.io
The benchmark results might not directly apply to your situation. Since the benchmark server only sends data back and doesn't perform anything meaningful, unlike real workload servers, the actual QPS you'll see will likely be much lower and the difference between C++ and Java/Go becomes insignificant. The raw numbers you see from the benchmark should be correct.


--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/N1q33b5qEP8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d6763f5e-b05c-4633-82c7-ce08823be005n%40googlegroups.com.


--
Regards,
Esun.

Amirsaman Memaripour

unread,
Oct 3, 2024, 6:57:13 PM10/3/24
to Esun Kim, grpc.io
That makes sense. Thank you Esun!
--

{ name     : "Amirsaman Memaripour",
  title    : "Staff Engineer",
  location : "New York, NY",
  twitter  : "@MongoDB",
  facebook : "MongoDB}

Reply all
Reply to author
Forward
0 new messages