Peng Ding commited on
Commit
a3e0be1
·
1 Parent(s): 3f2a039

add benchmark results and link from READMEs

Browse files

Stress-tested on HF Spaces (free tier) and a self-hosted VPS.
46/46 requests succeeded on both targets with detailed timing
and server load metrics.

Files changed (3) hide show
  1. BENCHMARK.md +96 -0
  2. README_en.md +13 -0
  3. README_zh.md +13 -0
BENCHMARK.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Benchmark Results
2
+
3
+ Stress test of VeilRender across two deployment targets, measured from a single client host.
4
+
5
+ **Date**: 2026-06-12
6
+
7
+ ## Test Environment
8
+
9
+ | | HF Spaces (free tier) | Self-hosted VPS |
10
+ |---|---|---|
11
+ | **CPU** | 2 vCPU (shared) | 3 vCPU Intel Xeon E5-2699 v4 @ 2.20 GHz (shared) |
12
+ | **Memory** | 16 GB (shared) | 1 GB (container limit, 3.8 GB host) |
13
+ | **OS / Runtime** | Docker (HF-managed) | Docker on Debian 12 |
14
+ | **Region** | US (AWS) | US East |
15
+ | **VeilRender config** | `MAX_CONCURRENT=3`, default timeout | same |
16
+
17
+ ## Test URLs
18
+
19
+ | Label | URL | Complexity |
20
+ |-------|-----|------------|
21
+ | example.com | `https://example.com` | Minimal static HTML |
22
+ | httpbin | `https://httpbin.org/html` | Small static page |
23
+ | Wikipedia | `https://en.wikipedia.org/wiki/Headless_browser` | Heavy JS + 300 KB HTML |
24
+ | HackerNews | `https://news.ycombinator.com` | Dynamic content |
25
+ | GitHub | `https://github.com/Oaklight/veilrender` | JS-heavy SPA |
26
+
27
+ ## Success Rate
28
+
29
+ | Test | Requests | HF Spaces | Self-hosted |
30
+ |------|----------|-----------|-------------|
31
+ | Sequential (5 URLs) | 5 | ✅ 5/5 | ✅ 5/5 |
32
+ | Concurrent × 3 | 3 | ✅ 3/3 | ✅ 3/3 |
33
+ | Concurrent × 5 | 5 | ✅ 5/5 | ✅ 5/5 |
34
+ | Concurrent × 10 (mixed) | 10 | ✅ 10/10 | ✅ 10/10 |
35
+ | Screenshot × 3 | 3 | ✅ 3/3 | ✅ 3/3 |
36
+ | Rapid-fire × 20 | 20 | ✅ 20/20 | ✅ 20/20 |
37
+ | **Total** | **46** | **46/46 (100%)** | **46/46 (100%)** |
38
+
39
+ ## Response Time
40
+
41
+ ### Sequential Rendering
42
+
43
+ | URL | HF Spaces | Self-hosted |
44
+ |-----|-----------|-------------|
45
+ | example.com | 0.99 s | 1.18 s |
46
+ | httpbin | 0.89 s | 1.16 s |
47
+ | Wikipedia | 1.55 s | 3.13 s |
48
+ | HackerNews | 1.24 s | 1.49 s |
49
+ | GitHub | 4.06 s | 4.86 s |
50
+ | **Total** | **8.72 s** | **11.81 s** |
51
+
52
+ ### Concurrent Rendering (example.com)
53
+
54
+ | Concurrency | HF Spaces (min / max) | Self-hosted (min / max) |
55
+ |-------------|----------------------|------------------------|
56
+ | 3 | 1.17 / 1.22 s | 1.10 / 2.06 s |
57
+ | 5 | 1.19 / 2.14 s | 1.22 / 3.50 s |
58
+
59
+ ### Concurrent × 10 (mixed URLs)
60
+
61
+ | | HF Spaces | Self-hosted |
62
+ |---|-----------|-------------|
63
+ | Fastest | 1.40 s | 1.29 s |
64
+ | Slowest | 9.37 s | 13.45 s |
65
+ | All succeeded | ✅ | ✅ |
66
+
67
+ ### Rapid-fire × 20 (sequential, example.com)
68
+
69
+ | | HF Spaces | Self-hosted |
70
+ |---|-----------|-------------|
71
+ | Average | 0.885 s | 1.029 s |
72
+ | Total | 17.71 s | 20.57 s |
73
+ | Success | 20/20 | 20/20 |
74
+
75
+ ## Server Load (Self-hosted)
76
+
77
+ Resource usage of the VeilRender container during the stress test:
78
+
79
+ | Phase | System Load | Container CPU | Container Memory |
80
+ |-------|------------|---------------|-----------------|
81
+ | Idle (pre-test) | 0.00 | 0.0% | 368 MiB |
82
+ | Concurrent × 10 start | 0.17 | 77.6% | 424 MiB |
83
+ | **Concurrent × 10 peak** | **1.64** | **237.4%** | **614 MiB** |
84
+ | Rapid-fire × 20 | 1.21 | 80.2% | 508 MiB |
85
+ | Post-test cooldown | 1.39 | 0.5% | 486 MiB |
86
+
87
+ Peak memory stayed well within the 1 GB container limit. No OOM kills observed.
88
+
89
+ ## Key Takeaways
90
+
91
+ - **100% success rate** on both platforms across all 46 requests per target.
92
+ - **HF Spaces was ~25% faster** on sequential workloads and ~30% faster under concurrency, likely due to more CPU headroom.
93
+ - **Concurrency queuing works correctly** — requests beyond `MAX_CONCURRENT=3` queue and complete without errors.
94
+ - **Self-hosted peak CPU hit 237%** (2+ cores saturated) during 10-concurrent, but recovered quickly with no failures.
95
+ - **Memory usage is modest** — peaked at 614 MiB under heavy load, well within a 1 GB container limit.
96
+ - HF Spaces free tier has a **cold-start penalty** when the Space has been idle; the self-hosted VPS runs continuously.
README_en.md CHANGED
@@ -91,6 +91,19 @@ All settings are configured via environment variables with the `VEILRENDER_` pre
91
  | `VEILRENDER_VIEWPORT_HEIGHT` | `720` | Browser viewport height |
92
  | `VEILRENDER_MAX_CONCURRENT` | `3` | Max concurrent browser contexts |
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  ## License
95
 
96
  MIT
 
91
  | `VEILRENDER_VIEWPORT_HEIGHT` | `720` | Browser viewport height |
92
  | `VEILRENDER_MAX_CONCURRENT` | `3` | Max concurrent browser contexts |
93
 
94
+ ## Benchmark
95
+
96
+ Tested on HF Spaces (free tier, 2 vCPU) and a self-hosted VPS (3 vCPU, 1 GB container). **100% success rate** across all 46 requests per target.
97
+
98
+ | Test | HF Spaces | Self-hosted |
99
+ |------|-----------|-------------|
100
+ | Sequential × 5 (mixed URLs) | 8.72 s total | 11.81 s total |
101
+ | Concurrent × 10 (mixed URLs) | 1.40 – 9.37 s | 1.29 – 13.45 s |
102
+ | Rapid-fire × 20 (sequential) | 0.885 s avg | 1.029 s avg |
103
+ | Peak container memory | — | 614 MiB / 1 GB |
104
+
105
+ Full results: [BENCHMARK.md](BENCHMARK.md)
106
+
107
  ## License
108
 
109
  MIT
README_zh.md CHANGED
@@ -91,6 +91,19 @@ curl -X POST http://localhost:7860/screenshot \
91
  | `VEILRENDER_VIEWPORT_HEIGHT` | `720` | 浏览器视口高度 |
92
  | `VEILRENDER_MAX_CONCURRENT` | `3` | 最大并发浏览器上下文数 |
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  ## 许可证
95
 
96
  MIT
 
91
  | `VEILRENDER_VIEWPORT_HEIGHT` | `720` | 浏览器视口高度 |
92
  | `VEILRENDER_MAX_CONCURRENT` | `3` | 最大并发浏览器上下文数 |
93
 
94
+ ## 性能测试
95
+
96
+ 在 HF Spaces(免费版,2 vCPU)和自托管 VPS(3 vCPU,容器限制 1 GB)上测试,每个目标 46 次请求**成功率 100%**。
97
+
98
+ | 测试项 | HF Spaces | 自托管 VPS |
99
+ |--------|-----------|------------|
100
+ | 顺序 × 5(混合 URL) | 总计 8.72 s | 总计 11.81 s |
101
+ | 并发 × 10(混合 URL) | 1.40 – 9.37 s | 1.29 – 13.45 s |
102
+ | 连续 × 20(顺序) | 平均 0.885 s | 平均 1.029 s |
103
+ | 容器内存峰值 | — | 614 MiB / 1 GB |
104
+
105
+ 完整结果:[BENCHMARK.md](BENCHMARK.md)
106
+
107
  ## 许可证
108
 
109
  MIT