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 1764801836806913ℹ️ migrating to version 1... /build/pkg/database/migrations.go:68
5 1764801836806998ℹ️ migrating to version 2... /build/pkg/database/migrations.go:75
6 1764801836807017ℹ️ migrating to version 3... /build/pkg/database/migrations.go:82
7 1764801836807022ℹ️ cleaning up ephemeral events (kinds 20000-29999)... /build/pkg/database/migrations.go:304
8 1764801836807029ℹ️ cleaned up 0 ephemeral events from database /build/pkg/database/migrations.go:349
9 1764801836807042ℹ️ migrating to version 4... /build/pkg/database/migrations.go:89
10 1764801836807046ℹ️ converting events to optimized inline storage (Reiser4 optimization)... /build/pkg/database/migrations.go:357
11 1764801836807056ℹ️ found 0 events to convert (0 regular, 0 replaceable, 0 addressable) /build/pkg/database/migrations.go:446
12 1764801836807061ℹ️ migration complete: converted 0 events to optimized inline storage, deleted 0 old keys /build/pkg/database/migrations.go:555
13 1764801836807076ℹ️ migrating to version 5... /build/pkg/database/migrations.go:96
14 1764801836807081ℹ️ re-encoding events with optimized tag binary format... /build/pkg/database/migrations.go:562
15 1764801836807094ℹ️ found 0 events with e/p tags to re-encode /build/pkg/database/migrations.go:649
16 1764801836807124ℹ️ no events need re-encoding /build/pkg/database/migrations.go:652
17 1764801836807178ℹ️ migrating to version 6... /build/pkg/database/migrations.go:103
18 1764801836807185ℹ️ converting events to compact serial-reference format... /build/pkg/database/migrations.go:706
19 1764801836807242ℹ️ found 0 events to convert to compact format /build/pkg/database/migrations.go:846
20 1764801836807283ℹ️ 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/03 22:43:56 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: 2.911273959s
33 Events/sec: 17174.61
34 Avg latency: 1.281647ms
35 P90 latency: 1.626819ms
36 P95 latency: 1.836808ms
37 P99 latency: 3.758588ms
38 Bottom 10% Avg latency: 742.249µs
39 Wiping database between tests...
40 RunBurstPatternTest (Badger)..
41
42 === Burst Pattern Test ===
43 Burst completed: 5000 events in 292.272251ms
44 Burst completed: 5000 events in 287.701125ms
45 Burst completed: 5000 events in 286.616429ms
46 Burst completed: 5000 events in 293.830439ms
47 Burst completed: 5000 events in 301.388252ms
48 Burst completed: 5000 events in 287.188158ms
49 Burst completed: 5000 events in 263.711266ms
50 Burst completed: 5000 events in 318.616274ms
51 Burst completed: 5000 events in 310.007309ms
52 Burst completed: 5000 events in 273.375973ms
53 Burst test completed: 50000 events in 7.922605603s, errors: 0
54 Events/sec: 6311.06
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.449120282s
73 Combined ops/sec: 2045.06
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: 417600 queries in 1m0.004478253s
86 Queries/sec: 6959.48
87 Avg query latency: 2.151151ms
88 P95 query latency: 8.027278ms
89 P99 query latency: 12.154981ms
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: 317282 operations (267282 queries, 50000 writes) in 1m0.002851777s
108 Operations/sec: 5287.78
109 Avg latency: 1.438019ms
110 Avg query latency: 1.509815ms
111 Avg write latency: 1.054223ms
112 P95 latency: 3.604275ms
113 P99 latency: 8.983541ms
114
115 === Badger benchmark completed ===
116
117
118 ================================================================================
119 BENCHMARK REPORT
120 ================================================================================
121
122 Test: Peak Throughput
123 Duration: 2.911273959s
124 Total Events: 50000
125 Events/sec: 17174.61
126 Success Rate: 100.0%
127 Concurrent Workers: 24
128 Memory Used: 127 MB
129 Avg Latency: 1.281647ms
130 P90 Latency: 1.626819ms
131 P95 Latency: 1.836808ms
132 P99 Latency: 3.758588ms
133 Bottom 10% Avg Latency: 742.249µs
134 ----------------------------------------
135
136 Test: Burst Pattern
137 Duration: 7.922605603s
138 Total Events: 50000
139 Events/sec: 6311.06
140 Success Rate: 100.0%
141 Concurrent Workers: 24
142 Memory Used: 207 MB
143 Avg Latency: 1.260479ms
144 P90 Latency: 1.672696ms
145 P95 Latency: 1.893887ms
146 P99 Latency: 3.384445ms
147 Bottom 10% Avg Latency: 627.786µs
148 ----------------------------------------
149
150 Test: Mixed Read/Write
151 Duration: 24.449120282s
152 Total Events: 50000
153 Events/sec: 2045.06
154 Success Rate: 100.0%
155 Concurrent Workers: 24
156 Memory Used: 160 MB
157 Avg Latency: 393.867µs
158 P90 Latency: 827.906µs
159 P95 Latency: 922.647µs
160 P99 Latency: 1.157515ms
161 Bottom 10% Avg Latency: 1.038892ms
162 ----------------------------------------
163
164 Test: Query Performance
165 Duration: 1m0.004478253s
166 Total Events: 417600
167 Events/sec: 6959.48
168 Success Rate: 100.0%
169 Concurrent Workers: 24
170 Memory Used: 205 MB
171 Avg Latency: 2.151151ms
172 P90 Latency: 6.525088ms
173 P95 Latency: 8.027278ms
174 P99 Latency: 12.154981ms
175 Bottom 10% Avg Latency: 8.836851ms
176 ----------------------------------------
177
178 Test: Concurrent Query/Store
179 Duration: 1m0.002851777s
180 Total Events: 317282
181 Events/sec: 5287.78
182 Success Rate: 100.0%
183 Concurrent Workers: 24
184 Memory Used: 168 MB
185 Avg Latency: 1.438019ms
186 P90 Latency: 2.919631ms
187 P95 Latency: 3.604275ms
188 P99 Latency: 8.983541ms
189 Bottom 10% Avg Latency: 5.142371ms
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-03T22:47:13+00:00
198 BENCHMARK_CONFIG:
199 Events: 50000
200 Workers: 24
201 Duration: 60s
202