Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.0 benchmark results #25

Closed
uatuko opened this issue Feb 2, 2024 · 3 comments
Closed

v0.2.0 benchmark results #25

uatuko opened this issue Feb 2, 2024 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@uatuko
Copy link
Owner

uatuko commented Feb 2, 2024

Benchmarks

Scenarios

  • 1a: Single client with no concurrent streams
  • 1b: Single client with 10 concurrent streams
  • 2a: 10 clients with no concurrent streams
  • 2b: 10 clients with 10 concurrent streams
  • 3a: 100 clients with no concurrent streams
  • 3b: 100 clients with 10 concurrent streams

Results (req/s)

1a 1b 2a 2b 3a 3b
single-threaded (db137df) 42k 193k 120k 449k 160k 452k
multi-threaded, 2 workers (db137df) 33k 166k 120k 431k 91k 425k
multi-threaded, hardware concurrency (db137df) 34k 164k 118k 450k 101k 408k

Benchmark details

Benchmarks were run on a MacBook Pro 2021 (M1 Max, 32GB), macOS 14.2.1 (23C71) against db137df.

Older benchmark results can be found in #2 and #20.

@uatuko uatuko added the documentation Improvements or additions to documentation label Feb 2, 2024
@uatuko uatuko self-assigned this Feb 2, 2024
@uatuko
Copy link
Owner Author

uatuko commented Feb 2, 2024

Single-threaded

single-threaded
diff --git a/examples/helloworld/main.cpp b/examples/helloworld/main.cpp
index debc569..758fae3 100644
--- a/examples/helloworld/main.cpp
+++ b/examples/helloworld/main.cpp
@@ -35,7 +35,7 @@ int main() {
 	GreeterImpl greeter;
 	Service     service(greeter);
 
-	grpcxx::server server;
+	grpcxx::server server(0);
 	server.add(service);
 
 	std::printf("Listening on [127.0.0.1:7000] ...\n");

1a

❯ h2load --clients=1 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 1 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 42407.33 req/s, 2.47MB/s
requests: 127222 total, 127223 started, 127222 done, 127222 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 127222 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 7.40MB (7761486) total, 248.49KB (254456) headers (space savings 94.74%), 3.76MB (3943882) data
                     min         max         mean         sd        +/- sd
time for request:       15us       301us        21us         5us    93.05%
time for connect:      339us       339us       339us         0us   100.00%
time to 1st byte:      633us       633us       633us         0us   100.00%
req/s           :   42406.41    42406.41    42406.41        0.00   100.00%

1b

❯ h2load --clients=1 --max-concurrent-streams=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 1 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 193210.00 req/s, 11.24MB/s
requests: 579630 total, 579640 started, 579630 done, 579630 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 579630 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 33.72MB (35361611) total, 1.11MB (1159272) headers (space savings 94.74%), 17.14MB (17968530) data
                     min         max         mean         sd        +/- sd
time for request:       37us       419us        46us         5us    83.31%
time for connect:       30us        30us        30us         0us   100.00%
time to 1st byte:      135us       135us       135us         0us   100.00%
req/s           :  193206.21   193206.21   193206.21        0.00   100.00%

2a

❯ h2load --clients=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 10 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 120498.67 req/s, 7.01MB/s
requests: 361496 total, 361506 started, 361496 done, 361496 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 361496 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 21.03MB (22054196) total, 706.16KB (723112) headers (space savings 94.74%), 10.69MB (11206376) data
                     min         max         mean         sd        +/- sd
time for request:       14us       220us        70us        21us    72.21%
time for connect:       21us       109us        49us        31us    80.00%
time to 1st byte:      164us       263us       211us        33us    50.00%
req/s           :   12035.92    12075.06    12049.48       10.80    80.00%

2b

❯ h2load --clients=10 --max-concurrent-streams=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 10 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 449450.00 req/s, 26.15MB/s
requests: 1348350 total, 1348450 started, 1348350 done, 1348350 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 1348350 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 78.45MB (82259375) total, 2.57MB (2696820) headers (space savings 94.74%), 39.86MB (41798850) data
                     min         max         mean         sd        +/- sd
time for request:       56us       581us       209us        73us    61.50%
time for connect:       22us       219us        59us        57us    90.00%
time to 1st byte:      246us       524us       360us        97us    70.00%
req/s           :   43781.72    47234.24    44943.32      971.42    80.00%

3a

❯ h2load --clients=100 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 100 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 160147.67 req/s, 9.32MB/s
requests: 480443 total, 480543 started, 480443 done, 480443 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 480443 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 27.96MB (29314323) total, 939.54KB (962086) headers (space savings 94.73%), 14.20MB (14893733) data
                     min         max         mean         sd        +/- sd
time for request:       53us      2.20ms       421us       147us    77.20%
time for connect:       23us       317us       169us        86us    57.00%
time to 1st byte:      911us      1.60ms      1.13ms       216us    78.00%
req/s           :    1592.89     1607.40     1601.18        2.77    65.00%

3b

❯ h2load --clients=100 --max-concurrent-streams=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 100 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 451906.67 req/s, 26.29MB/s
requests: 1355720 total, 1356720 started, 1355720 done, 1355720 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 1355720 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 78.88MB (82712473) total, 2.59MB (2712640) headers (space savings 94.73%), 40.08MB (42027320) data
                     min         max         mean         sd        +/- sd
time for request:      265us      5.20ms      2.20ms       367us    96.24%
time for connect:       22us       494us       259us       137us    58.00%
time to 1st byte:     1.92ms      3.92ms      2.63ms       585us    50.00%
req/s           :    2756.53     4652.13     4518.36      390.41    90.00%

@uatuko
Copy link
Owner Author

uatuko commented Feb 2, 2024

Multi-threaded, 2 workers

2 workers
diff --git a/examples/helloworld/main.cpp b/examples/helloworld/main.cpp
index debc569..a04f98d 100644
--- a/examples/helloworld/main.cpp
+++ b/examples/helloworld/main.cpp
@@ -35,7 +35,7 @@ int main() {
 	GreeterImpl greeter;
 	Service     service(greeter);
 
-	grpcxx::server server;
+	grpcxx::server server(2);
 	server.add(service);
 
 	std::printf("Listening on [127.0.0.1:7000] ...\n");

1a

❯ h2load --clients=1 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 1 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 33163.67 req/s, 1.93MB/s
requests: 99491 total, 99492 started, 99491 done, 99491 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 99491 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 5.79MB (6069700) total, 194.33KB (198994) headers (space savings 94.74%), 2.94MB (3084221) data
                     min         max         mean         sd        +/- sd
time for request:       20us       174us        28us         4us    89.53%
time for connect:      120us       120us       120us         0us   100.00%
time to 1st byte:      249us       249us       249us         0us   100.00%
req/s           :   33163.06    33163.06    33163.06        0.00   100.00%

1b

❯ h2load --clients=1 --max-concurrent-streams=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 1 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 165506.67 req/s, 9.63MB/s
requests: 496520 total, 496530 started, 496520 done, 496520 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 496520 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 28.89MB (30291303) total, 969.78KB (993052) headers (space savings 94.74%), 14.68MB (15392120) data
                     min         max         mean         sd        +/- sd
time for request:       42us       331us        54us         5us    78.47%
time for connect:       26us        26us        26us         0us   100.00%
time to 1st byte:      142us       142us       142us         0us   100.00%
req/s           :  165502.97   165502.97   165502.97        0.00   100.00%

2a

❯ h2load --clients=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 10 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 120382.33 req/s, 7.00MB/s
requests: 361147 total, 361157 started, 361147 done, 361147 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 361147 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 21.01MB (22032907) total, 705.48KB (722414) headers (space savings 94.74%), 10.68MB (11195557) data
                     min         max         mean         sd        +/- sd
time for request:       15us       311us        66us        17us    70.72%
time for connect:       20us       104us        39us        23us    90.00%
time to 1st byte:      145us       206us       187us        19us    90.00%
req/s           :   12030.99    12045.89    12037.77        4.04    70.00%

2b

❯ h2load --clients=10 --max-concurrent-streams=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 10 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 430950.00 req/s, 25.07MB/s
requests: 1292850 total, 1292950 started, 1292850 done, 1292850 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 1292850 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 75.22MB (78873459) total, 2.47MB (2585820) headers (space savings 94.74%), 38.22MB (40078350) data
                     min         max         mean         sd        +/- sd
time for request:       42us       850us       180us        46us    66.08%
time for connect:       26us       241us        68us        62us    90.00%
time to 1st byte:      287us       463us       380us        70us    50.00%
req/s           :   43075.75    43108.97    43093.66        9.05    80.00%

3a

❯ h2load --clients=100 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 100 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 90955.00 req/s, 5.29MB/s
requests: 272865 total, 272965 started, 272865 done, 272865 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 272865 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 15.88MB (16650765) total, 534.11KB (546930) headers (space savings 94.73%), 8.07MB (8458815) data
                     min         max         mean         sd        +/- sd
time for request:       52us      1.67ms       734us       254us    63.79%
time for connect:       22us       332us       177us        91us    57.00%
time to 1st byte:     1.17ms      2.01ms      1.50ms       319us    72.00%
req/s           :     908.95      909.61      909.29        0.24    46.00%

3b

❯ h2load --clients=100 --max-concurrent-streams=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 100 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 424666.67 req/s, 24.71MB/s
requests: 1274000 total, 1275000 started, 1274000 done, 1274000 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 1274000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 74.13MB (77726500) total, 2.43MB (2549200) headers (space savings 94.73%), 37.66MB (39494000) data
                     min         max         mean         sd        +/- sd
time for request:       60us      3.16ms      1.46ms       580us    56.40%
time for connect:       27us       563us       296us       160us    58.00%
time to 1st byte:     2.40ms      3.06ms      2.73ms       192us    57.00%
req/s           :    4243.78     4245.82     4244.65        0.60    63.00%

@uatuko
Copy link
Owner Author

uatuko commented Feb 2, 2024

Multi-threaded, hardware concurrency

hardware concurrency

1a

❯ h2load --clients=1 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 1 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 34289.67 req/s, 2.00MB/s
requests: 102869 total, 102870 started, 102869 done, 102869 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 102869 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 5.99MB (6275784) total, 200.93KB (205750) headers (space savings 94.74%), 3.04MB (3188939) data
                     min         max         mean         sd        +/- sd
time for request:       20us       494us        27us         4us    91.58%
time for connect:      208us       208us       208us         0us   100.00%
time to 1st byte:      409us       409us       409us         0us   100.00%
req/s           :   34288.67    34288.67    34288.67        0.00   100.00%

1b

❯ h2load --clients=1 --max-concurrent-streams=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 1 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 164196.67 req/s, 9.55MB/s
requests: 492590 total, 492600 started, 492590 done, 492590 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 492590 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 28.66MB (30051547) total, 962.10KB (985192) headers (space savings 94.74%), 14.56MB (15270290) data
                     min         max         mean         sd        +/- sd
time for request:       42us       545us        54us         5us    81.22%
time for connect:       45us        45us        45us         0us   100.00%
time to 1st byte:      153us       153us       153us         0us   100.00%
req/s           :  164193.76   164193.76   164193.76        0.00   100.00%

2a

❯ h2load --clients=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 10 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 118214.67 req/s, 6.88MB/s
requests: 354644 total, 354654 started, 354644 done, 354644 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 354644 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 20.63MB (21636224) total, 692.78KB (709408) headers (space savings 94.74%), 10.48MB (10993964) data
                     min         max         mean         sd        +/- sd
time for request:       18us      1.07ms        68us        20us    73.25%
time for connect:       22us       107us        42us        23us    90.00%
time to 1st byte:      175us       287us       229us        41us    50.00%
req/s           :   11815.94    11825.05    11821.09        3.27    50.00%

2b

❯ h2load --clients=10 --max-concurrent-streams=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 10 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 450420.00 req/s, 26.21MB/s
requests: 1351260 total, 1351360 started, 1351260 done, 1351260 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 1351260 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 78.62MB (82436950) total, 2.58MB (2702640) headers (space savings 94.74%), 39.95MB (41889060) data
                     min         max         mean         sd        +/- sd
time for request:       41us      1.09ms       169us        45us    71.95%
time for connect:       23us       238us        62us        63us    90.00%
time to 1st byte:      279us       551us       368us        87us    80.00%
req/s           :   45024.20    45053.48    45039.23        8.26    60.00%

3a

❯ h2load --clients=100 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 100 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 101368.00 req/s, 5.90MB/s
requests: 304104 total, 304204 started, 304104 done, 304104 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 304104 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 17.70MB (18556344) total, 595.13KB (609408) headers (space savings 94.73%), 8.99MB (9427224) data
                     min         max         mean         sd        +/- sd
time for request:       51us      2.47ms       760us       338us    63.68%
time for connect:       25us       355us       191us        94us    60.00%
time to 1st byte:     1.11ms      1.91ms      1.45ms       286us    57.00%
req/s           :    1013.00     1014.44     1013.44        0.26    74.00%

3b

❯ h2load --clients=100 --max-concurrent-streams=10 --duration=3 \
  --header='Content-Type: application/grpc' \
  --data=examples/helloworld/testdata/hello.grpc-lpm.data \
  http://localhost:7000/helloworld.v1.Greeter/Hello
starting benchmark...
spawning thread #0: 100 total client(s). Timing-based test with 0s of warm-up time and 3s of main duration for measurements.
Warm-up started for thread #0.
progress: 10% of clients started
progress: 20% of clients started
progress: 30% of clients started
progress: 40% of clients started
progress: 50% of clients started
progress: 60% of clients started
progress: 70% of clients started
progress: 80% of clients started
progress: 90% of clients started
progress: 100% of clients started
Warm-up phase is over for thread #0.
Main benchmark duration is started for thread #0.
Application protocol: h2c
Main benchmark duration is over for thread #0. Stopping all clients.
Stopped all clients for thread #0

finished in 3.00s, 408493.33 req/s, 23.77MB/s
requests: 1225480 total, 1226480 started, 1225480 done, 1225480 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 1225480 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 71.30MB (74766780) total, 2.34MB (2452160) headers (space savings 94.73%), 36.23MB (37989880) data
                     min         max         mean         sd        +/- sd
time for request:       70us      3.28ms      1.72ms       470us    65.91%
time for connect:       24us      2.27ms       292us       248us    95.00%
time to 1st byte:     2.38ms      4.61ms      2.73ms       268us    82.00%
req/s           :    4079.49     4084.78     4082.05        2.27    52.00%

@uatuko uatuko closed this as completed Feb 2, 2024
@uatuko uatuko mentioned this issue Feb 2, 2024
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant