Closed LesnyRumcajs closed 4 years ago
I hadn't heard of ghz
before. Thanks for the tip on a benchmarking tool for this! :100:
When I ran ghz
against your Crystal example, I didn't get any of the connection errors you did, but the errors due to the missing content-type
header and the errors from ungraceful handling of the socket closing definitely did happen on my machine. I've released v0.1.3 that fixes the content-type
error, but I'll hold off looking into the error for the dirty exit because it looks like the Ruby gem (maintained by Google) has the same issue.
Here's the output on my machine with this update:
➜ crystal_grpc git:(crystal_grpc) ✗ ghz --proto=../proto/helloworld/helloworld.proto --call=helloworld.Greeter.SayHello --insecure --duration 30s -d "{\"name\":\"it's not as performant as we expected\"}" 127.0.0.1:50051
Summary:
Count: 616479
Total: 30.00 s
Slowest: 16.58 ms
Fastest: 0.20 ms
Average: 2.41 ms
Requests/sec: 20548.94
Response time histogram:
0.199 [1] |
1.837 [55166] |∎∎∎∎∎
3.474 [473195] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
5.112 [86916] |∎∎∎∎∎∎∎
6.750 [407] |
8.387 [471] |
10.025 [222] |
11.663 [38] |
13.300 [4] |
14.938 [2] |
16.576 [7] |
Latency distribution:
10 % in 1.86 ms
25 % in 1.98 ms
50 % in 2.12 ms
75 % in 2.51 ms
90 % in 3.74 ms
95 % in 3.92 ms
99 % in 4.30 ms
Status code distribution:
[OK] 616429 responses
[Canceled] 1 responses
[Unavailable] 49 responses
Error distribution:
[1] rpc error: code = Canceled desc = grpc: the client connection is closing
[49] rpc error: code = Unavailable desc = transport is closing
I have a feeling your connection errors are due to the container being up but the program is still compiling, so I'll also put a couple suggestions on your benchmark PR. 🙂
As stated in the PR, your suggestions greatly helped. On top of that I don't get the content-type
errors anymore. Thank you! Don't bother with this dirty exit, it happens in all of the benchmarks I have. Something I'll probably need to address. :)
Hello! I'm trying to use this library for small gRPC benchmarking I have here https://github.com/LesnyRumcajs/grpc_bench
Unfortunately I noticed some issues, I'm not completely sure if they're connected to the library itself or some of it's dependencies, or it doesn't play nice with
ghz
defaults.Basically manual calls work quite fine (tested with Bloom RPC), the one over
ghz
seem to miserably fail. All in all, there is noOK
response over 30s of calls.The same test for Ruby seems rather fine:
Same goes for other languages / libraries I have tested. Could you please take a look into this? The code for the Crystal gRPC benchmark itself is on the branch for this PR. https://github.com/LesnyRumcajs/grpc_bench/pull/14