Update benchmark report, charts, and detailed results
Browse files- README.md +173 -61
- detailed_results.json +0 -0
- plots/gradio_cl_scaling.png +3 -0
- plots/latency_comparison.png +3 -0
- plots/protocol_overhead.png +3 -0
- plots/throughput_comparison.png +3 -0
README.md
CHANGED
|
@@ -1,63 +1,175 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
- name: concurrency_limit
|
| 15 |
-
dtype: float64
|
| 16 |
-
- name: duration_s
|
| 17 |
-
dtype: float64
|
| 18 |
-
- name: total_requests
|
| 19 |
-
dtype: int64
|
| 20 |
-
- name: successful_requests
|
| 21 |
-
dtype: int64
|
| 22 |
-
- name: failed_requests
|
| 23 |
-
dtype: int64
|
| 24 |
-
- name: error_rate_pct
|
| 25 |
-
dtype: float64
|
| 26 |
-
- name: throughput_rps
|
| 27 |
-
dtype: float64
|
| 28 |
-
- name: latency_min_ms
|
| 29 |
-
dtype: float64
|
| 30 |
-
- name: latency_p50_ms
|
| 31 |
-
dtype: float64
|
| 32 |
-
- name: latency_p75_ms
|
| 33 |
-
dtype: float64
|
| 34 |
-
- name: latency_p90_ms
|
| 35 |
-
dtype: float64
|
| 36 |
-
- name: latency_p95_ms
|
| 37 |
-
dtype: float64
|
| 38 |
-
- name: latency_p99_ms
|
| 39 |
-
dtype: float64
|
| 40 |
-
- name: latency_max_ms
|
| 41 |
-
dtype: float64
|
| 42 |
-
- name: latency_mean_ms
|
| 43 |
-
dtype: float64
|
| 44 |
-
- name: latency_stddev_ms
|
| 45 |
-
dtype: float64
|
| 46 |
-
- name: avg_cpu_pct
|
| 47 |
-
dtype: float64
|
| 48 |
-
- name: avg_memory_mb
|
| 49 |
-
dtype: float64
|
| 50 |
-
- name: peak_memory_mb
|
| 51 |
-
dtype: float64
|
| 52 |
-
splits:
|
| 53 |
-
- name: train
|
| 54 |
-
num_bytes: 89349
|
| 55 |
-
num_examples: 337
|
| 56 |
-
download_size: 43894
|
| 57 |
-
dataset_size: 89349
|
| 58 |
-
configs:
|
| 59 |
-
- config_name: default
|
| 60 |
-
data_files:
|
| 61 |
-
- split: train
|
| 62 |
-
path: data/train-*
|
| 63 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
tags:
|
| 6 |
+
- mcp
|
| 7 |
+
- benchmark
|
| 8 |
+
- gradio
|
| 9 |
+
- fastmcp
|
| 10 |
+
- api-performance
|
| 11 |
+
pretty_name: MCP Server Benchmark Results
|
| 12 |
+
size_categories:
|
| 13 |
+
- n<1K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# 🔬 Gradio vs FastMCP Benchmark Report
|
| 17 |
+
|
| 18 |
+
**Generated:** 2026-03-02T21:04:48.460108
|
| 19 |
+
|
| 20 |
+
**Total scenarios:** 337
|
| 21 |
+
|
| 22 |
+
## Executive Summary
|
| 23 |
+
|
| 24 |
+
- **echo**: Fastmcp wins (100.9 vs 189.9 RPS, 1.88x difference)
|
| 25 |
+
- Gradio best config: concurrency_limit=1.0
|
| 26 |
+
- **fibonacci**: Fastmcp wins (45.5 vs 55.0 RPS, 1.21x difference)
|
| 27 |
+
- Gradio best config: concurrency_limit=nan
|
| 28 |
+
- **json_transform**: Fastmcp wins (94.5 vs 165.4 RPS, 1.75x difference)
|
| 29 |
+
- Gradio best config: concurrency_limit=5.0
|
| 30 |
+
- **async_sleep**: Fastmcp wins (94.0 vs 104.3 RPS, 1.11x difference)
|
| 31 |
+
- Gradio best config: concurrency_limit=10.0
|
| 32 |
+
- **payload_echo**: Fastmcp wins (97.4 vs 172.0 RPS, 1.77x difference)
|
| 33 |
+
- Gradio best config: concurrency_limit=10.0
|
| 34 |
+
|
| 35 |
+
## Throughput (Requests/Second)
|
| 36 |
+
|
| 37 |
+
| | ('fastmcp', 'http_api') | ('fastmcp', 'mcp_streamable') | ('gradio', 'http_api') | ('gradio', 'mcp_streamable') |
|
| 38 |
+
|:-----------------------|--------------------------:|--------------------------------:|-------------------------:|-------------------------------:|
|
| 39 |
+
| ('async_sleep', 1) | 16.15 | 12.27 | 8.72 | 14.2 |
|
| 40 |
+
| ('async_sleep', 10) | 104.32 | 0 | 60.07 | 94.02 |
|
| 41 |
+
| ('async_sleep', 25) | 54.87 | 0 | 38.35 | 59.43 |
|
| 42 |
+
| ('async_sleep', 50) | 49.07 | 14.67 | 34.16 | 53.27 |
|
| 43 |
+
| ('echo', 1) | 189.87 | 80.53 | 11.45 | 77.57 |
|
| 44 |
+
| ('echo', 10) | 79.67 | 50.13 | 53.64 | 100.86 |
|
| 45 |
+
| ('echo', 25) | 78.61 | 38.44 | 39.15 | 71.79 |
|
| 46 |
+
| ('echo', 50) | 63.15 | 32.53 | 34.48 | 66.26 |
|
| 47 |
+
| ('fibonacci', 1) | 43.7 | 31.06 | 12.08 | 36.39 |
|
| 48 |
+
| ('fibonacci', 10) | 54.99 | 43.91 | 38.65 | 45.5 |
|
| 49 |
+
| ('fibonacci', 25) | 53.34 | 30.89 | 34.5 | 45.02 |
|
| 50 |
+
| ('fibonacci', 50) | 45.36 | 26.2 | 31.99 | 43.81 |
|
| 51 |
+
| ('json_transform', 1) | 165.42 | 61.54 | 11.58 | 76.65 |
|
| 52 |
+
| ('json_transform', 10) | 85.96 | 35.91 | 54.97 | 94.48 |
|
| 53 |
+
| ('json_transform', 25) | 50.54 | 34.85 | 40.27 | 68.97 |
|
| 54 |
+
| ('json_transform', 50) | 60.12 | 29.89 | 34.32 | 65.31 |
|
| 55 |
+
| ('payload_echo', 1) | 172 | 41.58 | 11.45 | 73.3 |
|
| 56 |
+
| ('payload_echo', 10) | 77.79 | 0 | 51.81 | 97.35 |
|
| 57 |
+
| ('payload_echo', 25) | 68.79 | 31.16 | 39.1 | 71.09 |
|
| 58 |
+
| ('payload_echo', 50) | 61.18 | 31.2 | 34.25 | 67.32 |
|
| 59 |
+
|
| 60 |
+
## Latency p50 (ms)
|
| 61 |
+
|
| 62 |
+
| | ('fastmcp', 'http_api') | ('fastmcp', 'mcp_streamable') | ('gradio', 'http_api') | ('gradio', 'mcp_streamable') |
|
| 63 |
+
|:-----------------------|--------------------------:|--------------------------------:|-------------------------:|-------------------------------:|
|
| 64 |
+
| ('async_sleep', 1) | 62.532 | 78.089 | 111.556 | 66.027 |
|
| 65 |
+
| ('async_sleep', 10) | 85.062 | 0 | 150.179 | 100.587 |
|
| 66 |
+
| ('async_sleep', 25) | 340.339 | 0 | 527.091 | 320.992 |
|
| 67 |
+
| ('async_sleep', 50) | 718.018 | 2516.25 | 1171.91 | 695.627 |
|
| 68 |
+
| ('echo', 1) | 5 | 11.973 | 81.08 | 12.232 |
|
| 69 |
+
| ('echo', 10) | 86.744 | 174.638 | 162.622 | 91.59 |
|
| 70 |
+
| ('echo', 25) | 235.09 | 542.953 | 519.866 | 262.988 |
|
| 71 |
+
| ('echo', 50) | 519.902 | 1329.38 | 1151.61 | 515.254 |
|
| 72 |
+
| ('fibonacci', 1) | 21.503 | 30.181 | 66.38 | 26.53 |
|
| 73 |
+
| ('fibonacci', 10) | 171.886 | 205.011 | 258.26 | 215.707 |
|
| 74 |
+
| ('fibonacci', 25) | 441.508 | 701.476 | 611.039 | 550.476 |
|
| 75 |
+
| ('fibonacci', 50) | 768.812 | 1612.96 | 1281.01 | 1147.82 |
|
| 76 |
+
| ('json_transform', 1) | 5.996 | 15.004 | 79.591 | 12.565 |
|
| 77 |
+
| ('json_transform', 10) | 62.526 | 234.142 | 157.188 | 95.055 |
|
| 78 |
+
| ('json_transform', 25) | 322.956 | 607.396 | 502.211 | 270.443 |
|
| 79 |
+
| ('json_transform', 50) | 536.465 | 1419.95 | 1190.15 | 507.173 |
|
| 80 |
+
| ('payload_echo', 1) | 5.266 | 22.11 | 80.573 | 13.012 |
|
| 81 |
+
| ('payload_echo', 10) | 90.521 | 0 | 167.601 | 94.079 |
|
| 82 |
+
| ('payload_echo', 25) | 214.665 | 650.125 | 526.828 | 269.352 |
|
| 83 |
+
| ('payload_echo', 50) | 523.993 | 1344.04 | 1184.89 | 501.297 |
|
| 84 |
+
|
| 85 |
+
## Gradio concurrency_limit Scaling
|
| 86 |
+
|
| 87 |
+
How does Gradio's throughput change as concurrency_limit increases?
|
| 88 |
+
|
| 89 |
+
| | 1.0 | 5.0 | 10.0 |
|
| 90 |
+
|:-----------------------|--------:|--------:|--------:|
|
| 91 |
+
| ('async_sleep', 1) | 10.405 | 11.27 | 11.2825 |
|
| 92 |
+
| ('async_sleep', 10) | 30.7 | 72.29 | 71.0275 |
|
| 93 |
+
| ('async_sleep', 25) | 24.375 | 45.8375 | 46.4825 |
|
| 94 |
+
| ('async_sleep', 50) | 30.3925 | 41.5775 | 40.7275 |
|
| 95 |
+
| ('echo', 1) | 43.7875 | 42.05 | 33.84 |
|
| 96 |
+
| ('echo', 10) | 59.0175 | 73.0875 | 59.8225 |
|
| 97 |
+
| ('echo', 25) | 45.0575 | 51.41 | 44.3075 |
|
| 98 |
+
| ('echo', 50) | 42.3375 | 45.29 | 38.755 |
|
| 99 |
+
| ('fibonacci', 1) | 23.95 | 23.1425 | 20.555 |
|
| 100 |
+
| ('fibonacci', 10) | 31.4525 | 40.265 | 37.3475 |
|
| 101 |
+
| ('fibonacci', 25) | 31.0675 | 38.22 | 35.7975 |
|
| 102 |
+
| ('fibonacci', 50) | 30.54 | 36.47 | 31.64 |
|
| 103 |
+
| ('json_transform', 1) | 43.485 | 42.26 | 36.2125 |
|
| 104 |
+
| ('json_transform', 10) | 55.41 | 74.06 | 66.2875 |
|
| 105 |
+
| ('json_transform', 25) | 40.025 | 53.8475 | 49.5975 |
|
| 106 |
+
| ('json_transform', 50) | 34.0875 | 49.08 | 45.295 |
|
| 107 |
+
| ('payload_echo', 1) | 36.205 | 38.2725 | 41.5925 |
|
| 108 |
+
| ('payload_echo', 10) | 48.8175 | 66.65 | 67.315 |
|
| 109 |
+
| ('payload_echo', 25) | 38.595 | 51.07 | 50.155 |
|
| 110 |
+
| ('payload_echo', 50) | 39.38 | 46.105 | 45.0975 |
|
| 111 |
+
|
| 112 |
+
## Protocol Overhead: HTTP API vs MCP
|
| 113 |
+
|
| 114 |
+
Comparing latency of the same tool called via REST API vs MCP protocol:
|
| 115 |
+
|
| 116 |
+
| | http_api | mcp_streamable |
|
| 117 |
+
|:------------------------------|-----------:|-----------------:|
|
| 118 |
+
| ('fastmcp', 'async_sleep') | 301.488 | 648.586 |
|
| 119 |
+
| ('fastmcp', 'echo') | 211.684 | 514.737 |
|
| 120 |
+
| ('fastmcp', 'fibonacci') | 350.927 | 637.407 |
|
| 121 |
+
| ('fastmcp', 'json_transform') | 231.986 | 569.122 |
|
| 122 |
+
| ('fastmcp', 'payload_echo') | 208.611 | 504.068 |
|
| 123 |
+
| ('gradio', 'async_sleep') | 920.038 | 332.935 |
|
| 124 |
+
| ('gradio', 'echo') | 693.001 | 246.16 |
|
| 125 |
+
| ('gradio', 'fibonacci') | 763.248 | 506.714 |
|
| 126 |
+
| ('gradio', 'json_transform') | 690.337 | 234.987 |
|
| 127 |
+
| ('gradio', 'payload_echo') | 710.962 | 239.838 |
|
| 128 |
+
|
| 129 |
+
## Error Rates
|
| 130 |
+
|
| 131 |
+
| scenario_id | error_rate_pct |
|
| 132 |
+
|:------------------------------------------------------|-----------------:|
|
| 133 |
+
| fastmcp__http_api__fibonacci__vu50__clunlimited | 0.037 |
|
| 134 |
+
| gradio__mcp_streamable__echo__vu25__cl1__noq | 0.023 |
|
| 135 |
+
| gradio__mcp_streamable__payload_echo__vu25__cl1__noq | 0.028 |
|
| 136 |
+
| gradio__http_api__echo__vu25__cl5 | 0.05 |
|
| 137 |
+
| gradio__http_api__fibonacci__vu25__cl5 | 0.05 |
|
| 138 |
+
| gradio__http_api__payload_echo__vu50__cl5__noq | 0.05 |
|
| 139 |
+
| gradio__mcp_streamable__async_sleep__vu25__cl5__noq | 0.03 |
|
| 140 |
+
| gradio__http_api__echo__vu25__cl10 | 0.048 |
|
| 141 |
+
| gradio__http_api__fibonacci__vu25__cl10__noq | 0.056 |
|
| 142 |
+
| gradio__http_api__fibonacci__vu50__cl10 | 0.066 |
|
| 143 |
+
| gradio__http_api__payload_echo__vu25__cl10__noq | 0.056 |
|
| 144 |
+
| gradio__mcp_streamable__async_sleep__vu25__cl10__noq | 0.028 |
|
| 145 |
+
| gradio__http_api__async_sleep__vu25__clunlimited__noq | 0.047 |
|
| 146 |
+
|
| 147 |
+
## Resource Usage
|
| 148 |
+
|
| 149 |
+
| server | ('mean', 'avg_cpu_pct') | ('mean', 'avg_memory_mb') | ('mean', 'peak_memory_mb') | ('max', 'avg_cpu_pct') | ('max', 'avg_memory_mb') | ('max', 'peak_memory_mb') |
|
| 150 |
+
|:---------|--------------------------:|----------------------------:|-----------------------------:|-------------------------:|---------------------------:|----------------------------:|
|
| 151 |
+
| fastmcp | 0 | 5.684 | 5.684 | 0 | 6.15 | 6.15 |
|
| 152 |
+
| gradio | 0 | 6.14953 | 6.14953 | 0 | 6.16 | 6.16 |
|
| 153 |
+
|
| 154 |
+
## Benchmark Charts
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
|
| 158 |
+

|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
|
| 162 |
+

|
| 163 |
+
|
| 164 |
+
## Methodology
|
| 165 |
+
|
| 166 |
+
- Both servers use identical tool implementations (imported from shared_tools.py)
|
| 167 |
+
- Each scenario runs in an isolated server subprocess
|
| 168 |
+
- Warmup period excluded from measurements
|
| 169 |
+
- Load generated by async httpx workers (not external tools)
|
| 170 |
+
- MCP tests use full protocol lifecycle (initialize → call_tool)
|
| 171 |
+
- System metrics sampled every 1s via psutil
|
| 172 |
+
|
| 173 |
+
---
|
| 174 |
+
|
| 175 |
+
*Benchmarks generated by [mcp-server-bench](https://github.com/Mandark-droid/mcp-server-bench)*
|
detailed_results.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
plots/gradio_cl_scaling.png
ADDED
|
Git LFS Details
|
plots/latency_comparison.png
ADDED
|
Git LFS Details
|
plots/protocol_overhead.png
ADDED
|
Git LFS Details
|
plots/throughput_comparison.png
ADDED
|
Git LFS Details
|