nostr-rs-relay_results.txt raw
1 Starting Nostr Relay Benchmark (Badger Backend)
2 Data Directory: /tmp/benchmark_nostr-rs-relay_8
3 Events: 50000, Workers: 24, Duration: 1m0s
4 1764846517510492ℹ️ migrating to version 1... /build/pkg/database/migrations.go:68
5 1764846517510692ℹ️ migrating to version 2... /build/pkg/database/migrations.go:75
6 1764846517511210ℹ️ migrating to version 3... /build/pkg/database/migrations.go:82
7 1764846517511251ℹ️ cleaning up ephemeral events (kinds 20000-29999)... /build/pkg/database/migrations.go:304
8 1764846517511274ℹ️ cleaned up 0 ephemeral events from database /build/pkg/database/migrations.go:349
9 1764846517511304ℹ️ migrating to version 4... /build/pkg/database/migrations.go:89
10 1764846517511317ℹ️ converting events to optimized inline storage (Reiser4 optimization)... /build/pkg/database/migrations.go:357
11 1764846517511329ℹ️ found 0 events to convert (0 regular, 0 replaceable, 0 addressable) /build/pkg/database/migrations.go:446
12 1764846517511340ℹ️ migration complete: converted 0 events to optimized inline storage, deleted 0 old keys /build/pkg/database/migrations.go:555
13 1764846517511366ℹ️ migrating to version 5... /build/pkg/database/migrations.go:96
14 1764846517511373ℹ️ re-encoding events with optimized tag binary format... /build/pkg/database/migrations.go:562
15 1764846517511388ℹ️ found 0 events with e/p tags to re-encode /build/pkg/database/migrations.go:649
16 1764846517511394ℹ️ no events need re-encoding /build/pkg/database/migrations.go:652
17 1764846517511443ℹ️ migrating to version 6... /build/pkg/database/migrations.go:103
18 1764846517511452ℹ️ converting events to compact serial-reference format... /build/pkg/database/migrations.go:706
19 1764846517511466ℹ️ found 0 events to convert to compact format /build/pkg/database/migrations.go:846
20 1764846517511472ℹ️ no events need conversion /build/pkg/database/migrations.go:849
21
22 ╔════════════════════════════════════════════════════════╗
23 ║ BADGER BACKEND BENCHMARK SUITE ║
24 ╚════════════════════════════════════════════════════════╝
25
26 === Starting Badger benchmark ===
27 RunPeakThroughputTest (Badger)..
28
29 === Peak Throughput Test ===
30 2025/12/04 11:08:37 INFO: Successfully loaded embedded libsecp256k1 v5.0.0 from /tmp/orly-libsecp256k1/libsecp256k1.so
31 Events saved: 50000/50000 (100.0%), errors: 0
32 Duration: 4.118969633s
33 Events/sec: 12138.96
34 Avg latency: 1.937994ms
35 P90 latency: 2.852802ms
36 P95 latency: 3.444328ms
37 P99 latency: 5.727836ms
38 Bottom 10% Avg latency: 946.456µs
39 Wiping database between tests...
40 RunBurstPatternTest (Badger)..
41
42 === Burst Pattern Test ===
43 Burst completed: 5000 events in 403.020917ms
44 Burst completed: 5000 events in 372.371612ms
45 Burst completed: 5000 events in 424.238707ms
46 Burst completed: 5000 events in 385.317421ms
47 Burst completed: 5000 events in 516.841571ms
48 Burst completed: 5000 events in 591.703187ms
49 Burst completed: 5000 events in 445.314485ms
50 Burst completed: 5000 events in 374.011153ms
51 Burst completed: 5000 events in 398.6942ms
52 Burst completed: 5000 events in 365.965806ms
53 Burst test completed: 50000 events in 9.28457886s, errors: 0
54 Events/sec: 5385.27
55 Wiping database between tests...
56 RunMixedReadWriteTest (Badger)..
57
58 === Mixed Read/Write Test ===
59 Generating 1000 unique synthetic events (minimum 300 bytes each)...
60 Generated 1000 events:
61 Average content size: 312 bytes
62 All events are unique (incremental timestamps)
63 All events are properly signed
64
65 Pre-populating database for read tests...
66 Generating 50000 unique synthetic events (minimum 300 bytes each)...
67 Generated 50000 events:
68 Average content size: 314 bytes
69 All events are unique (incremental timestamps)
70 All events are properly signed
71
72 Mixed test completed: 25000 writes, 25000 reads in 24.684808581s
73 Combined ops/sec: 2025.54
74 Wiping database between tests...
75 RunQueryTest (Badger)..
76
77 === Query Test ===
78 Generating 10000 unique synthetic events (minimum 300 bytes each)...
79 Generated 10000 events:
80 Average content size: 313 bytes
81 All events are unique (incremental timestamps)
82 All events are properly signed
83
84 Pre-populating database with 10000 events for query tests...
85 Query test completed: 251672 queries in 1m0.006178379s
86 Queries/sec: 4194.10
87 Avg query latency: 4.01666ms
88 P95 query latency: 15.051188ms
89 P99 query latency: 22.451758ms
90 Wiping database between tests...
91 RunConcurrentQueryStoreTest (Badger)..
92
93 === Concurrent Query/Store Test ===
94 Generating 5000 unique synthetic events (minimum 300 bytes each)...
95 Generated 5000 events:
96 Average content size: 313 bytes
97 All events are unique (incremental timestamps)
98 All events are properly signed
99
100 Pre-populating database with 5000 events for concurrent query/store test...
101 Generating 50000 unique synthetic events (minimum 300 bytes each)...
102 Generated 50000 events:
103 Average content size: 314 bytes
104 All events are unique (incremental timestamps)
105 All events are properly signed
106
107 Concurrent test completed: 219001 operations (169001 queries, 50000 writes) in 1m0.004144652s
108 Operations/sec: 3649.76
109 Avg latency: 2.620549ms
110 Avg query latency: 2.844617ms
111 Avg write latency: 1.863195ms
112 P95 latency: 7.482377ms
113 P99 latency: 20.396275ms
114
115 === Badger benchmark completed ===
116
117
118 ================================================================================
119 BENCHMARK REPORT
120 ================================================================================
121
122 Test: Peak Throughput
123 Duration: 4.118969633s
124 Total Events: 50000
125 Events/sec: 12138.96
126 Success Rate: 100.0%
127 Concurrent Workers: 24
128 Memory Used: 150 MB
129 Avg Latency: 1.937994ms
130 P90 Latency: 2.852802ms
131 P95 Latency: 3.444328ms
132 P99 Latency: 5.727836ms
133 Bottom 10% Avg Latency: 946.456µs
134 ----------------------------------------
135
136 Test: Burst Pattern
137 Duration: 9.28457886s
138 Total Events: 50000
139 Events/sec: 5385.27
140 Success Rate: 100.0%
141 Concurrent Workers: 24
142 Memory Used: 259 MB
143 Avg Latency: 2.040218ms
144 P90 Latency: 3.113648ms
145 P95 Latency: 3.901749ms
146 P99 Latency: 6.623842ms
147 Bottom 10% Avg Latency: 930.455µs
148 ----------------------------------------
149
150 Test: Mixed Read/Write
151 Duration: 24.684808581s
152 Total Events: 50000
153 Events/sec: 2025.54
154 Success Rate: 100.0%
155 Concurrent Workers: 24
156 Memory Used: 170 MB
157 Avg Latency: 435.806µs
158 P90 Latency: 909.692µs
159 P95 Latency: 1.063135ms
160 P99 Latency: 1.414473ms
161 Bottom 10% Avg Latency: 1.173081ms
162 ----------------------------------------
163
164 Test: Query Performance
165 Duration: 1m0.006178379s
166 Total Events: 251672
167 Events/sec: 4194.10
168 Success Rate: 100.0%
169 Concurrent Workers: 24
170 Memory Used: 159 MB
171 Avg Latency: 4.01666ms
172 P90 Latency: 11.874709ms
173 P95 Latency: 15.051188ms
174 P99 Latency: 22.451758ms
175 Bottom 10% Avg Latency: 16.47537ms
176 ----------------------------------------
177
178 Test: Concurrent Query/Store
179 Duration: 1m0.004144652s
180 Total Events: 219001
181 Events/sec: 3649.76
182 Success Rate: 100.0%
183 Concurrent Workers: 24
184 Memory Used: 154 MB
185 Avg Latency: 2.620549ms
186 P90 Latency: 5.591506ms
187 P95 Latency: 7.482377ms
188 P99 Latency: 20.396275ms
189 Bottom 10% Avg Latency: 10.345145ms
190 ----------------------------------------
191
192 Report saved to: /tmp/benchmark_nostr-rs-relay_8/benchmark_report.txt
193 AsciiDoc report saved to: /tmp/benchmark_nostr-rs-relay_8/benchmark_report.adoc
194
195 RELAY_NAME: nostr-rs-relay
196 RELAY_URL: ws://nostr-rs-relay:8080
197 TEST_TIMESTAMP: 2025-12-04T11:11:56+00:00
198 BENCHMARK_CONFIG:
199 Events: 50000
200 Workers: 24
201 Duration: 60s
202