--- url: "https://grpc.io/docs/guides/benchmarking/" titulek: "Benchmarking | gRPC" h1: "Benchmarking" popis: "gRPC is designed to support high-performance open-source RPCs in many languages. This page describes performance benchmarking tools, scenarios considered by tests, and the testing infrastructure." jazyk: "en" kanonicka: "https://grpc.io/docs/guides/benchmarking/" drobecky: ["Docs", "Guides", "Benchmarking"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-13 21:00:38" znaku: 5589 slov: 626 kodovani: "utf-8" sha256: "7a8134763428aa4354fb917ab98fc857de0f540603d0d2a84e111d9c300652f0" --- # Benchmarking gRPC is designed to support high-performance open-source RPCs in many languages. This page describes performance benchmarking tools, scenarios considered by tests, and the testing infrastructure. Contents # Benchmarking gRPC is designed to support high-performance open-source RPCs in many languages. This page describes performance benchmarking tools, scenarios considered by tests, and the testing infrastructure. ### Overview gRPC is designed for both high-performance and high-productivity design of distributed applications. Continuous performance benchmarking is a critical part of the gRPC development workflow. Multi-language performance tests run every few hours against the master branch, and these numbers are reported to a dashboard for visualization. - [Multi-language performance dashboard @master (latest dev version)](https://grafana-dot-grpc-testing.appspot.com/) - [Legacy dashboard (same data as above)](https://performance-dot-grpc-testing.appspot.com/explore?dashboard=5180705743044608) ### Performance testing design Each language implements a performance testing worker that implements a gRPC [WorkerService](https://github.com/grpc/grpc/blob/master/src/proto/grpc/testing/worker_service.proto). This service directs the worker to act as either a client or a server for the actual benchmark test, represented as [BenchmarkService](https://github.com/grpc/grpc/blob/master/src/proto/grpc/testing/benchmark_service.proto). That service has two methods: - UnaryCall – a unary RPC of a simple request that specifies the number of bytes to return in the response. - StreamingCall – a streaming RPC that allows repeated ping-pongs of request and response messages akin to the UnaryCall. These workers are controlled by a [driver](https://github.com/grpc/grpc/blob/master/test/cpp/qps/qps_json_driver.cc) that takes as input a scenario description (in JSON format) and an environment variable specifying the host:port of each worker process. ### Languages under test The following languages have continuous performance testing as both clients and servers at master: - C++ - Java - Go - C# - Node.js - Python - Ruby In addition to running as both the client-side and server-side of performance tests, all languages are tested as clients against a C++ server, and as servers against a C++ client. This test aims to provide the current upper bound of performance for a given language’s client or server implementation without testing the other side. Although PHP or mobile environments do not support a gRPC server (which is needed for our performance tests), their client-side performance can be benchmarked using a proxy WorkerService written in another language. This code is implemented for PHP but is not yet in continuous testing mode. ### Scenarios under test There are several important scenarios under test and displayed in the dashboards above, including the following: - Contentionless latency – the median and tail response latencies seen with only 1 client sending a single message at a time using StreamingCall. - QPS – the messages/second rate when there are 2 clients and a total of 64 channels, each of which has 100 outstanding messages at a time sent using StreamingCall. - Scalability (for selected languages) – the number of messages/second per server core. Most performance testing is using secure communication and protobufs. Some C++ tests additionally use insecure communication and the generic (non-protobuf) API to display peak performance. Additional scenarios may be added in the future. ### Testing infrastructure All performance benchmarks are run in our dedicated GKE cluster, where each benchmark worker (a client or a server) gets scheduled to different GKE node (and each GKE node is a separate GCE VM) in one of our worker pools. The source code for the benchmarking framework we use is publicly available in the [test-infra github repository](https://github.com/grpc/test-infra). Most test instances are 8-core systems, and these are used for both latency and QPS measurement. For C++ and Java, we additionally support QPS testing on 32-core systems. All QPS tests use 2 identical client machines for each server, to make sure that QPS measurement is not client-limited. Last modified January 24, 2022: [Update dashboard link in benchmarking page. (#930) (e7c6231)](https://github.com/grpc/grpc.io/commit/e7c62311f6790015e45aab916216e4340f09418b) [View page source](https://github.com/grpc/grpc.io/tree/main/content/en/docs/guides/benchmarking.md) [Edit this page](https://github.com/grpc/grpc.io/edit/main/content/en/docs/guides/benchmarking.md) [Create child page](https://github.com/grpc/grpc.io/new/main/content/en/docs/guides/benchmarking.md?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+section+at+the+top+of+the+page+%28weight+controls+how+its+ordered+amongst+other+pages+in+the+same+directory%3B+lowest+number+first%29.%0A%2A+Add+a+good+commit+message+at+the+bottom+of+the+page+%28%3C80+characters%3B+use+the+extended+description+field+for+more+detail%29.%0A%2A+Create+a+new+branch+so+you+can+preview+your+new+file+and+request+a+review+via+Pull+Request.%0A) [Create documentation issue](https://github.com/grpc/grpc.io/issues/new?title=Benchmarking) [Create project issue](https://github.com/grpc/grpc.io/issues/new)