-
Notifications
You must be signed in to change notification settings - Fork 2
RPC Benchmarks
René Jochum edited this page Aug 9, 2024
·
36 revisions
The rps benchmark sends X bytes (default 1000) to server which echoes it to the client, it does that for 15 seconds.
-
My workstation:
- OS: Arch GNU/Linux
- CPU: AMD Ryzen 5900X 12-Core @ 3.7 - 4.8GHz
- Memory: 32GiB DDR4-5200
-
go version go1.22.5 linux/amd64
-
server cmd:
go install github.com/go-orb/plugins/benchmarks/rps/cmd/orb-rps-server GOMAXPROCS=4 ./orb-rps-server
-
client cmd:
go install github.com/go-orb/plugins/benchmarks/rps/cmd/orb-rps-client for i in "hertzhttp" "drpc" "grpc" "h2c" "http" "https" "http3" "hertzh2c"; do orb-rps-client --threads=12 --transport=$i 2>&1 | grep "Summary" sleep 5 done
-
results:
Transport reqs hertzhttp 3.666.399 drpc 2.360.953 grpc 1.575.307 h2c 1.952.676 http 1.927.007 https 1.481.516 http3 793.358 hertzh2c 777.631
-
My workstation:
- OS: Arch GNU/Linux
- CPU: AMD Ryzen 5900X 12-Core @ 3.7 - 4.8GHz
- Memory: 32GiB DDR4-5200
-
go version go1.21.4 linux/amd64
-
consul cmd:
./registry/consul/test/bin/linux_amd64/consul agent --bind=127.0.0.1 --data-dir=/tmp/consul --server --bootstrap-expect=1 --ui
-
server cmd:
cd benchmarks/rps/server; go generate; GOMAXPROCS=4 go run . --registry=consul
-
client cmd:
cd benchmarks/rps/client; \ go generate; \ go build -ldflags="-s -w" .; \ for i in "hertzhttp" "herzth2c" "drpc" "grpc" "h2c" "http" "https" "http3"; do \ ./client --threads=12 --registry=consul --transport=$i 2>&1 | grep "Summary"; \ sleep 5; \ done
-
wrk:
cd benchmarks/rps; wrk -H 'Host: 127.0.0.1' -H 'Connection: keep-alive' --latency -d 15 -c 256 --timeout 8 -t 4 http://127.0.0.1:31002/echo.Echo/Echo -s wrk_1000bytes_post.lua -- 16
-
results:
reqs: Number of requests done in 15 seconds using 1000 byte packages.
reqs wo/o hertz: Same as above but hertz commented out everywhere.
Except a few thousand (up to 10k) requests these numbers are stable here.
Transport reqs w/o hertz hertzhttp 4.319.340 - hertzh2c 946.851 - drpc 2.124.218 1.999.886 grpc 2.098.188 2.195.153 h2c 1.810.498 1.170.675 http 1.828.053 1.201.229 https 1.688.699 1.118.347 http3 727.034 688.720