Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

gRPC Benchmarks

JBD edited this page Feb 22, 2018 · 6 revisions

Checkout https://github.com/rakyll/grpc-go/tree/opencensus-benchmarks.

OpenCensus enabled

For example, client stats enabled:

$ go run benchmark/benchmain/main.go -benchtime=10s -workloads=all \
  -compression=on -maxConcurrentCalls=1 -trace=off \
  -reqSizeBytes=1,1048576 -respSizeBytes=1,1048576 -networkMode=Local \
  -opencensus-client-stats=true -resultFile=enabled
Unary-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1B-respSize_1B-Compressor_true:
50_Latency: 218.9870 µs 	90_Latency: 375.9860 µs 	99_Latency: 580.6740 µs 	Avg latency: 250.1660 µs 	Count: 39930 	16810 Bytes/op	291 Allocs/op
Histogram (unit: µs)
Count: 39930  Min: 123.4  Max: 3082.6  Avg: 250.17
------------------------------------------------------------
[    123.435000,     123.436000)      1    0.0%    0.0%
[    123.436000,     123.440236)      0    0.0%    0.0%
[    123.440236,     123.462418)      0    0.0%    0.0%
[    123.462418,     123.578568)      1    0.0%    0.0%
[    123.578568,     124.186753)      0    0.0%    0.0%
[    124.186753,     127.371353)      8    0.0%    0.0%
[    127.371353,     144.046656)    218    0.5%    0.6%
[    144.046656,     231.362396)  21883   54.8%   55.4%  #####
[    231.362396,     688.567800)  17665   44.2%   99.6%  ####
[    688.567800,    3082.601000)    153    0.4%  100.0%
[   3082.601000,            inf)      1    0.0%  100.0%

Stream-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1B-respSize_1B-Compressor_true:
50_Latency: 446.4850 µs 	90_Latency: 755.2070 µs 	99_Latency: 1102.5960 µs 	Avg latency: 483.2900 µs 	Count: 20677 	1281839 Bytes/op	174 Allocs/op
Histogram (unit: µs)
Count: 20677  Min: 172.6  Max: 2829.7  Avg: 483.29
------------------------------------------------------------
[    172.555000,     172.556000)      1    0.0%    0.0%
[    172.556000,     172.560174)      0    0.0%    0.0%
[    172.560174,     172.581770)      0    0.0%    0.0%
[    172.581770,     172.693507)      0    0.0%    0.0%
[    172.693507,     173.271632)      0    0.0%    0.0%
[    173.271632,     176.262831)      1    0.0%    0.0%
[    176.262831,     191.739211)     70    0.3%    0.3%
[    191.739211,     271.813550)   3416   16.5%   16.9%  ##
[    271.813550,     686.115861)  13636   65.9%   82.8%  #######
[    686.115861,    2829.704000)   3552   17.2%  100.0%  ##
[   2829.704000,            inf)      1    0.0%  100.0%

Unary-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1B-respSize_1048576B-Compressor_true:
50_Latency: 3.0459 ms 	90_Latency: 3.6193 ms 	99_Latency: 105.3921 ms 	Avg latency: 8.8047 ms 	Count: 1136 	10554165 Bytes/op	715 Allocs/op
Histogram (unit: ms)
Count: 1136  Min:   2.4  Max: 107.0  Avg: 8.80
------------------------------------------------------------
[        2.430474,         2.430475)     1    0.1%    0.1%
[        2.430475,         2.430482)     0    0.0%    0.1%
[        2.430482,         2.430535)     0    0.0%    0.1%
[        2.430535,         2.430945)     0    0.0%    0.1%
[        2.430945,         2.434140)     0    0.0%    0.1%
[        2.434140,         2.459002)     1    0.1%    0.2%
[        2.459002,         2.652460)    26    2.3%    2.5%
[        2.652460,         4.157821)  1036   91.2%   93.7%  #########
[        4.157821,        15.871542)     8    0.7%   94.4%
[       15.871542,       107.019955)    63    5.5%   99.9%  #
[      107.019955,              inf)     1    0.1%  100.0%

Stream-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1B-respSize_1048576B-Compressor_true:
50_Latency: 7.8807 ms 	90_Latency: 8.4074 ms 	99_Latency: 8.9953 ms 	Avg latency: 7.9286 ms 	Count: 1262 	9068617 Bytes/op	207 Allocs/op
Histogram (unit: ms)
Count: 1262  Min:   7.1  Max:  10.6  Avg: 7.93
------------------------------------------------------------
[       7.075920,        7.075921)     1    0.1%    0.1%
[       7.075921,        7.075925)     0    0.0%    0.1%
[       7.075925,        7.075948)     0    0.0%    0.1%
[       7.075948,        7.076072)     0    0.0%    0.1%
[       7.076072,        7.076728)     0    0.0%    0.1%
[       7.076728,        7.080229)     0    0.0%    0.1%
[       7.080229,        7.098895)     0    0.0%    0.1%
[       7.098895,        7.198416)     4    0.3%    0.4%
[       7.198416,        7.729048)   403   31.9%   32.3%  ###
[       7.729048,       10.558273)   853   67.6%   99.9%  #######
[      10.558273,             inf)     1    0.1%  100.0%

Unary-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1048576B-respSize_1B-Compressor_true:
50_Latency: 3.0981 ms 	90_Latency: 103.6593 ms 	99_Latency: 106.1256 ms 	Avg latency: 14.4416 ms 	Count: 697 10554487 Bytes/op	734 Allocs/op
Histogram (unit: ms)
Count: 697  Min:   2.4  Max: 110.0  Avg: 14.44
------------------------------------------------------------
[        2.439971,         2.439972)    1    0.1%    0.1%
[        2.439972,         2.439979)    0    0.0%    0.1%
[        2.439979,         2.440032)    0    0.0%    0.1%
[        2.440032,         2.440447)    1    0.1%    0.3%
[        2.440447,         2.443682)    0    0.0%    0.3%
[        2.443682,         2.468939)    1    0.1%    0.4%
[        2.468939,         2.666076)   41    5.9%    6.3%  #
[        2.666076,         4.204767)  518   74.3%   80.6%  #######
[        4.204767,        16.214588)   59    8.5%   89.1%  #
[       16.214588,       109.953834)   75   10.8%   99.9%  #
[      109.953834,              inf)    1    0.1%  100.0%

Stream-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1048576B-respSize_1B-Compressor_true:
50_Latency: 7.9760 ms 	90_Latency: 9.2319 ms 	99_Latency: 12.1248 ms 	Avg latency: 8.2276 ms 	Count: 1216 	9068582 Bytes/op	208 Allocs/op
Histogram (unit: ms)
Count: 1216  Min:   7.1  Max:  15.7  Avg: 8.23
------------------------------------------------------------
[       7.133083,        7.133084)     1    0.1%    0.1%
[       7.133084,        7.133089)     0    0.0%    0.1%
[       7.133089,        7.133118)     0    0.0%    0.1%
[       7.133118,        7.133288)     0    0.0%    0.1%
[       7.133288,        7.134292)     0    0.0%    0.1%
[       7.134292,        7.140209)     1    0.1%    0.2%
[       7.140209,        7.175096)     1    0.1%    0.2%
[       7.175096,        7.380793)    37    3.0%    3.3%
[       7.380793,        8.593598)   972   79.9%   83.2%  ########
[       8.593598,       15.744395)   203   16.7%   99.9%  ##
[      15.744395,             inf)     1    0.1%  100.0%

Unary-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1048576B-respSize_1048576B-Compressor_true:
50_Latency: 5.6787 ms 	90_Latency: 107.6397 ms 	99_Latency: 109.1809 ms 	Avg latency: 24.6577 ms 	Count: 408 21091509 Bytes/op	1169 Allocs/op
Histogram (unit: ms)
Count: 408  Min:   4.8  Max: 210.9  Avg: 24.66
------------------------------------------------------------
[        4.827481,         4.827482)    1    0.2%    0.2%
[        4.827482,         4.827489)    0    0.0%    0.2%
[        4.827489,         4.827551)    0    0.0%    0.2%
[        4.827551,         4.828072)    0    0.0%    0.2%
[        4.828072,         4.832437)    0    0.0%    0.2%
[        4.832437,         4.869059)    2    0.5%    0.7%
[        4.869059,         5.176328)   30    7.4%    8.1%  #
[        5.176328,         7.754374)  301   73.8%   81.9%  #######
[        7.754374,        29.384708)    1    0.2%   82.1%
[       29.384708,       210.867573)   72   17.6%   99.8%  ##
[      210.867573,              inf)    1    0.2%  100.0%

Stream-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1048576B-respSize_1048576B-Compressor_true:
50_Latency: 15.0847 ms 	90_Latency: 15.8698 ms 	99_Latency: 17.1063 ms 	Avg latency: 15.1789 ms 	Count: 659 	16956567 Bytes/op	224 Allocs/op
Histogram (unit: ms)
Count: 659  Min:  14.2  Max:  19.8  Avg: 15.18
------------------------------------------------------------
[      14.158382,       14.158383)    1    0.2%    0.2%
[      14.158383,       14.158388)    0    0.0%    0.2%
[      14.158388,       14.158414)    0    0.0%    0.2%
[      14.158414,       14.158561)    0    0.0%    0.2%
[      14.158561,       14.159387)    0    0.0%    0.2%
[      14.159387,       14.164042)    0    0.0%    0.2%
[      14.164042,       14.190252)    5    0.8%    0.9%
[      14.190252,       14.337832)   17    2.6%    3.5%
[      14.337832,       15.168811)  349   53.0%   56.4%  #####
[      15.168811,       19.847814)  286   43.4%   99.8%  ####
[      19.847814,             inf)    1    0.2%  100.0%

OpenCensus disabled

$ go run benchmark/benchmain/main.go -benchtime=10s -workloads=all \
  -compression=on -maxConcurrentCalls=1 -trace=off \
  -reqSizeBytes=1,1048576 -respSizeBytes=1,1048576 -networkMode=Local \
  -resultFile=disabled
Unary-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1B-respSize_1B-Compressor_true:
50_Latency: 165.4040 µs 	90_Latency: 239.3130 µs 	99_Latency: 375.4510 µs 	Avg latency: 181.3780 µs 	Count: 55050 	14270 Bytes/op	231 Allocs/op
Histogram (unit: µs)
Count: 55050  Min: 111.7  Max: 1349.4  Avg: 181.38
------------------------------------------------------------
[    111.657000,     111.658000)      1    0.0%    0.0%
[    111.658000,     111.661753)      0    0.0%    0.0%
[    111.661753,     111.679590)      0    0.0%    0.0%
[    111.679590,     111.764370)      0    0.0%    0.0%
[    111.764370,     112.167321)      0    0.0%    0.0%
[    112.167321,     114.082516)      7    0.0%    0.0%
[    114.082516,     123.185290)    142    0.3%    0.3%
[    123.185290,     166.450078)  28291   51.4%   51.7%  #####
[    166.450078,     372.084299)  26043   47.3%   99.0%  #####
[    372.084299,    1349.448000)    565    1.0%  100.0%
[   1349.448000,            inf)      1    0.0%  100.0%

Stream-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1B-respSize_1B-Compressor_true:
50_Latency: 340.0440 µs 	90_Latency: 670.2560 µs 	99_Latency: 951.8220 µs 	Avg latency: 398.4180 µs 	Count: 25079 	1013740 Bytes/op	147 Allocs/op
Histogram (unit: µs)
Count: 25079  Min: 150.9  Max: 5011.5  Avg: 398.42
------------------------------------------------------------
[    150.948000,     150.949000)      1    0.0%    0.0%
[    150.949000,     150.953533)      0    0.0%    0.0%
[    150.953533,     150.978615)      0    0.0%    0.0%
[    150.978615,     151.117393)      0    0.0%    0.0%
[    151.117393,     151.885265)      0    0.0%    0.0%
[    151.885265,     156.133943)      8    0.0%    0.0%
[    156.133943,     179.642147)   1130    4.5%    4.5%
[    179.642147,     309.714499)  10285   41.0%   45.6%  ####
[    309.714499,    1029.412912)  13508   53.9%   99.4%  #####
[   1029.412912,    5011.549000)    146    0.6%  100.0%
[   5011.549000,            inf)      1    0.0%  100.0%

Unary-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1B-respSize_1048576B-Compressor_true:
50_Latency: 3.0807 ms 	90_Latency: 103.9076 ms 	99_Latency: 106.9699 ms 	Avg latency: 14.0351 ms 	Count: 718 10551693 Bytes/op	659 Allocs/op
Histogram (unit: ms)
Count: 718  Min:   2.3  Max: 111.5  Avg: 14.04
------------------------------------------------------------
[        2.297397,         2.297398)    1    0.1%    0.1%
[        2.297398,         2.297405)    0    0.0%    0.1%
[        2.297405,         2.297458)    0    0.0%    0.1%
[        2.297458,         2.297875)    0    0.0%    0.1%
[        2.297875,         2.301135)    0    0.0%    0.1%
[        2.301135,         2.326621)    0    0.0%    0.1%
[        2.326621,         2.525898)   12    1.7%    1.8%
[        2.525898,         4.084036)  565   78.7%   80.5%  ########
[        4.084036,        16.267031)   64    8.9%   89.4%  #
[       16.267031,       111.525192)   75   10.4%   99.9%  #
[      111.525192,              inf)    1    0.1%  100.0%

Stream-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1B-respSize_1048576B-Compressor_true:
50_Latency: 7.5784 ms 	90_Latency: 8.0724 ms 	99_Latency: 8.9285 ms 	Avg latency: 7.6419 ms 	Count: 1309 	9066541 Bytes/op	186 Allocs/op
Histogram (unit: ms)
Count: 1309  Min:   7.0  Max:  10.3  Avg: 7.64
------------------------------------------------------------
[       7.025709,        7.025710)     1    0.1%    0.1%
[       7.025710,        7.025714)     0    0.0%    0.1%
[       7.025714,        7.025737)     0    0.0%    0.1%
[       7.025737,        7.025858)     0    0.0%    0.1%
[       7.025858,        7.026497)     0    0.0%    0.1%
[       7.026497,        7.029886)     1    0.1%    0.2%
[       7.029886,        7.047844)     1    0.1%    0.2%
[       7.047844,        7.142997)    23    1.8%    2.0%
[       7.142997,        7.647195)   765   58.4%   60.4%  ######
[       7.647195,       10.318852)   517   39.5%   99.9%  ####
[      10.318852,             inf)     1    0.1%  100.0%

Unary-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1048576B-respSize_1B-Compressor_true:
50_Latency: 2.9226 ms 	90_Latency: 104.1707 ms 	99_Latency: 105.8027 ms 	Avg latency: 14.3494 ms 	Count: 698 10551676 Bytes/op	658 Allocs/op
Histogram (unit: ms)
Count: 698  Min:   2.3  Max: 106.6  Avg: 14.35
------------------------------------------------------------
[        2.264803,         2.264804)    1    0.1%    0.1%
[        2.264804,         2.264811)    0    0.0%    0.1%
[        2.264811,         2.264864)    0    0.0%    0.1%
[        2.264864,         2.265274)    0    0.0%    0.1%
[        2.265274,         2.268465)    0    0.0%    0.1%
[        2.268465,         2.293289)    2    0.3%    0.4%
[        2.293289,         2.486394)   20    2.9%    3.3%
[        2.486394,         3.988565)  584   83.7%   87.0%  ########
[        3.988565,        15.673994)   13    1.9%   88.8%
[       15.673994,       106.575271)   77   11.0%   99.9%  #
[      106.575271,              inf)    1    0.1%  100.0%

Stream-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1048576B-respSize_1B-Compressor_true:
50_Latency: 7.7652 ms 	90_Latency: 8.8747 ms 	99_Latency: 10.8562 ms 	Avg latency: 7.9547 ms 	Count: 1258 	9067324 Bytes/op	188 Allocs/op
Histogram (unit: ms)
Count: 1258  Min:   7.0  Max:  12.6  Avg: 7.95
------------------------------------------------------------
[       6.977970,        6.977971)     1    0.1%    0.1%
[       6.977971,        6.977976)     0    0.0%    0.1%
[       6.977976,        6.978002)     0    0.0%    0.1%
[       6.978002,        6.978148)     0    0.0%    0.1%
[       6.978148,        6.978969)     1    0.1%    0.2%
[       6.978969,        6.983589)     0    0.0%    0.2%
[       6.983589,        7.009560)     1    0.1%    0.2%
[       7.009560,        7.155584)    19    1.5%    1.7%
[       7.155584,        7.976598)   819   65.1%   66.9%  #######
[       7.976598,       12.592706)   416   33.1%   99.9%  ###
[      12.592706,             inf)     1    0.1%  100.0%

Unary-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1048576B-respSize_1048576B-Compressor_true:
50_Latency: 5.5364 ms 	90_Latency: 107.8498 ms 	99_Latency: 110.3773 ms 	Avg latency: 23.9946 ms 	Count: 418 21093969 Bytes/op	1109 Allocs/op
Histogram (unit: ms)
Count: 418  Min:   4.6  Max: 212.1  Avg: 23.99
------------------------------------------------------------
[        4.601790,         4.601791)    1    0.2%    0.2%
[        4.601791,         4.601798)    0    0.0%    0.2%
[        4.601798,         4.601861)    0    0.0%    0.2%
[        4.601861,         4.602382)    0    0.0%    0.2%
[        4.602382,         4.606761)    0    0.0%    0.2%
[        4.606761,         4.643533)    2    0.5%    0.7%
[        4.643533,         4.952303)   26    6.2%    6.9%  #
[        4.952303,         7.545002)  306   73.2%   80.1%  #######
[        7.545002,        29.315556)   10    2.4%   82.5%
[       29.315556,       212.120041)   72   17.2%   99.8%  ##
[      212.120041,              inf)    1    0.2%  100.0%

Stream-traceMode_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_1-reqSize_1048576B-respSize_1048576B-Compressor_true:
50_Latency: 14.8092 ms 	90_Latency: 16.5125 ms 	99_Latency: 19.2323 ms 	Avg latency: 15.1231 ms 	Count: 662 	16813718 Bytes/op	204 Allocs/op
Histogram (unit: ms)
Count: 662  Min:  13.7  Max:  21.9  Avg: 15.12
------------------------------------------------------------
[      13.721722,       13.721723)    1    0.2%    0.2%
[      13.721723,       13.721728)    0    0.0%    0.2%
[      13.721728,       13.721756)    0    0.0%    0.2%
[      13.721756,       13.721924)    0    0.0%    0.2%
[      13.721924,       13.722906)    0    0.0%    0.2%
[      13.722906,       13.728667)    0    0.0%    0.2%
[      13.728667,       13.762457)    0    0.0%    0.2%
[      13.762457,       13.960669)   11    1.7%    1.8%
[      13.960669,       15.123341)  443   66.9%   68.7%  #######
[      15.123341,       21.943370)  206   31.1%   99.8%  ###
[      21.943370,             inf)    1    0.2%  100.0%
Clone this wiki locally