Update benchmark report, charts, and detailed results
Browse files- README.md +119 -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,121 @@
|
|
| 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: 12854
|
| 55 |
-
num_examples: 48
|
| 56 |
-
download_size: 16712
|
| 57 |
-
dataset_size: 12854
|
| 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-02T13:04:10.857215
|
| 19 |
+
|
| 20 |
+
**Total scenarios:** 48
|
| 21 |
+
|
| 22 |
+
## Executive Summary
|
| 23 |
+
|
| 24 |
+
- **echo**: Fastmcp wins (96.6 vs 176.5 RPS, 1.83x difference)
|
| 25 |
+
- Gradio best config: concurrency_limit=nan
|
| 26 |
+
- **fibonacci**: Fastmcp wins (43.5 vs 57.1 RPS, 1.31x difference)
|
| 27 |
+
- Gradio best config: concurrency_limit=nan
|
| 28 |
+
- **async_sleep**: Gradio wins (93.1 vs 80.2 RPS, 1.16x difference)
|
| 29 |
+
- Gradio best config: concurrency_limit=nan
|
| 30 |
+
- **payload_echo**: Fastmcp wins (82.5 vs 164.8 RPS, 2.0x difference)
|
| 31 |
+
- Gradio best config: concurrency_limit=nan
|
| 32 |
+
|
| 33 |
+
## Throughput (Requests/Second)
|
| 34 |
+
|
| 35 |
+
| | ('fastmcp', 'http_api') | ('fastmcp', 'mcp_streamable') | ('gradio', 'http_api') | ('gradio', 'mcp_streamable') |
|
| 36 |
+
|:---------------------|--------------------------:|--------------------------------:|-------------------------:|-------------------------------:|
|
| 37 |
+
| ('async_sleep', 1) | 15.76 | 14.41 | 8.54 | 14.23 |
|
| 38 |
+
| ('async_sleep', 10) | 80.21 | 56.47 | 56.79 | 93.11 |
|
| 39 |
+
| ('async_sleep', 25) | 42.1 | 40.13 | 37.4 | 56.76 |
|
| 40 |
+
| ('echo', 1) | 176.5 | 72.37 | 11.16 | 72.12 |
|
| 41 |
+
| ('echo', 10) | 79.84 | 43.33 | 49.37 | 96.56 |
|
| 42 |
+
| ('echo', 25) | 62.5 | 39.44 | 37.87 | 70.43 |
|
| 43 |
+
| ('fibonacci', 1) | 45.39 | 35.94 | 11.91 | 35.18 |
|
| 44 |
+
| ('fibonacci', 10) | 57.08 | 47.93 | 37.39 | 43.5 |
|
| 45 |
+
| ('fibonacci', 25) | 51.19 | 35.94 | 32.67 | 43.21 |
|
| 46 |
+
| ('payload_echo', 1) | 164.84 | 80.1 | 11.62 | 70.56 |
|
| 47 |
+
| ('payload_echo', 10) | 91.25 | 50.53 | 49.93 | 82.54 |
|
| 48 |
+
| ('payload_echo', 25) | 66.84 | 41.57 | 37.2 | 61.16 |
|
| 49 |
+
|
| 50 |
+
## Latency p50 (ms)
|
| 51 |
+
|
| 52 |
+
| | ('fastmcp', 'http_api') | ('fastmcp', 'mcp_streamable') | ('gradio', 'http_api') | ('gradio', 'mcp_streamable') |
|
| 53 |
+
|:---------------------|--------------------------:|--------------------------------:|-------------------------:|-------------------------------:|
|
| 54 |
+
| ('async_sleep', 1) | 62.599 | 64.32 | 112.296 | 75.659 |
|
| 55 |
+
| ('async_sleep', 10) | 105.196 | 159.981 | 155.612 | 102.057 |
|
| 56 |
+
| ('async_sleep', 25) | 430.916 | 528.933 | 546.454 | 337.852 |
|
| 57 |
+
| ('echo', 1) | 5.005 | 13.005 | 101.503 | 13.037 |
|
| 58 |
+
| ('echo', 10) | 102.519 | 201.01 | 177.598 | 95.355 |
|
| 59 |
+
| ('echo', 25) | 298.811 | 529.175 | 549.508 | 275.746 |
|
| 60 |
+
| ('fibonacci', 1) | 20.998 | 26.535 | 66.875 | 27.521 |
|
| 61 |
+
| ('fibonacci', 10) | 166.862 | 189.789 | 266.299 | 226.342 |
|
| 62 |
+
| ('fibonacci', 25) | 463.179 | 591.419 | 639.153 | 573.479 |
|
| 63 |
+
| ('payload_echo', 1) | 5.998 | 12 | 81.067 | 13.662 |
|
| 64 |
+
| ('payload_echo', 10) | 95.531 | 175.658 | 175.569 | 110.116 |
|
| 65 |
+
| ('payload_echo', 25) | 336.98 | 514.13 | 557.964 | 321.014 |
|
| 66 |
+
|
| 67 |
+
## Gradio concurrency_limit Scaling
|
| 68 |
+
|
| 69 |
+
How does Gradio's throughput change as concurrency_limit increases?
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
## Protocol Overhead: HTTP API vs MCP
|
| 74 |
+
|
| 75 |
+
Comparing latency of the same tool called via REST API vs MCP protocol:
|
| 76 |
+
|
| 77 |
+
| | http_api | mcp_streamable |
|
| 78 |
+
|:----------------------------|-----------:|-----------------:|
|
| 79 |
+
| ('fastmcp', 'async_sleep') | 199.57 | 251.078 |
|
| 80 |
+
| ('fastmcp', 'echo') | 135.445 | 247.73 |
|
| 81 |
+
| ('fastmcp', 'fibonacci') | 217.013 | 269.248 |
|
| 82 |
+
| ('fastmcp', 'payload_echo') | 146.17 | 233.929 |
|
| 83 |
+
| ('gradio', 'async_sleep') | 271.454 | 171.856 |
|
| 84 |
+
| ('gradio', 'echo') | 276.203 | 128.046 |
|
| 85 |
+
| ('gradio', 'fibonacci') | 324.109 | 275.781 |
|
| 86 |
+
| ('gradio', 'payload_echo') | 271.533 | 148.264 |
|
| 87 |
+
|
| 88 |
+
## Error Rates
|
| 89 |
+
|
| 90 |
+
All scenarios completed with 0% error rate. ✅
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
## Resource Usage
|
| 94 |
+
|
| 95 |
+
| 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') |
|
| 96 |
+
|:---------|--------------------------:|----------------------------:|-----------------------------:|-------------------------:|---------------------------:|----------------------------:|
|
| 97 |
+
| fastmcp | 0 | 6.14458 | 6.14458 | 0 | 6.15 | 6.15 |
|
| 98 |
+
| gradio | 0 | 6.14417 | 6.14417 | 0 | 6.15 | 6.15 |
|
| 99 |
+
|
| 100 |
+
## Benchmark Charts
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
|
| 104 |
+

|
| 105 |
+
|
| 106 |
+

|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
|
| 110 |
+
## Methodology
|
| 111 |
+
|
| 112 |
+
- Both servers use identical tool implementations (imported from shared_tools.py)
|
| 113 |
+
- Each scenario runs in an isolated server subprocess
|
| 114 |
+
- Warmup period excluded from measurements
|
| 115 |
+
- Load generated by async httpx workers (not external tools)
|
| 116 |
+
- MCP tests use full protocol lifecycle (initialize → call_tool)
|
| 117 |
+
- System metrics sampled every 1s via psutil
|
| 118 |
+
|
| 119 |
+
---
|
| 120 |
+
|
| 121 |
+
*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
|