Skip to content

Poor gRPC performance on test #50135

@alexyakunin

Description

@alexyakunin

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I wrote a small benchmark for some of mainstream RPC libraries on .NET - originally to benchmark my own library (Stl.Rpc), but ended up adding nearly every other option.

Benchmark description and its results:

Expected Behavior

gRPC is expected to perform on SignalR level. Instead, it performs ~ on HttpClient level.

To clarify, the difference between gRPC and SignalR performance is dramatic:

  • 101.81K calls/s vs 345.35K calls/s on SayHello LAN test - it's the same payload as in https://github.com/LesnyRumcajs/grpc_bench - and other LAN tests with smaller payloads perform even worse
  • 125.11K calls/s vs 1.22M calls/s on the same SayHello test running server + client on a single machine.

Steps To Reproduce

  • Clone the repository: git clone [email protected]:servicetitan/Stl.Fusion.Samples.git
  • Run dotnet run -c Release --project src/RpcBenchmark/RpcBenchmark.csproj

See https://servicetitan.github.io/Stl.Fusion.Samples/rpc-benchmark to try some other run options.

Exceptions (if any)

No response

.NET Version

8.0 Preview 7

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-grpcIncludes: GRPC wire-up, templates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions