This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
Starting Nostr Relay Benchmark (Badger Backend)
|
||||
Data Directory: /tmp/benchmark_next-orly-badger_8
|
||||
Events: 50000, Workers: 24, Duration: 1m0s
|
||||
1763665982729511ℹ️ migrating to version 1... /build/pkg/database/migrations.go:66
|
||||
1763665982729576ℹ️ migrating to version 2... /build/pkg/database/migrations.go:73
|
||||
1763665982729601ℹ️ migrating to version 3... /build/pkg/database/migrations.go:80
|
||||
1763665982729608ℹ️ cleaning up ephemeral events (kinds 20000-29999)... /build/pkg/database/migrations.go:287
|
||||
1763665982729620ℹ️ cleaned up 0 ephemeral events from database /build/pkg/database/migrations.go:332
|
||||
1763665982729639ℹ️ migrating to version 4... /build/pkg/database/migrations.go:87
|
||||
1763665982729646ℹ️ converting events to optimized inline storage (Reiser4 optimization)... /build/pkg/database/migrations.go:340
|
||||
1763665982729664ℹ️ found 0 events to convert (0 regular, 0 replaceable, 0 addressable) /build/pkg/database/migrations.go:429
|
||||
1763665982729670ℹ️ migration complete: converted 0 events to optimized inline storage, deleted 0 old keys /build/pkg/database/migrations.go:538
|
||||
|
||||
╔════════════════════════════════════════════════════════╗
|
||||
║ BADGER BACKEND BENCHMARK SUITE ║
|
||||
╚════════════════════════════════════════════════════════╝
|
||||
|
||||
=== Starting Badger benchmark ===
|
||||
RunPeakThroughputTest (Badger)..
|
||||
|
||||
=== Peak Throughput Test ===
|
||||
2025/11/20 19:13:02 WARN: Failed to load embedded library from /tmp/orly-libsecp256k1/libsecp256k1.so: Error relocating /tmp/orly-libsecp256k1/libsecp256k1.so: __fprintf_chk: symbol not found, falling back to system paths
|
||||
2025/11/20 19:13:02 INFO: Successfully loaded libsecp256k1 v5.0.0 from system path: libsecp256k1.so.2
|
||||
Events saved: 50000/50000 (100.0%), errors: 0
|
||||
Duration: 3.002317183s
|
||||
Events/sec: 16653.80
|
||||
Avg latency: 1.333202ms
|
||||
P90 latency: 1.77034ms
|
||||
P95 latency: 2.040484ms
|
||||
P99 latency: 2.890994ms
|
||||
Bottom 10% Avg latency: 755.546µs
|
||||
Wiping database between tests...
|
||||
RunBurstPatternTest (Badger)..
|
||||
|
||||
=== Burst Pattern Test ===
|
||||
Burst completed: 5000 events in 288.855321ms
|
||||
Burst completed: 5000 events in 312.543723ms
|
||||
Burst completed: 5000 events in 287.863452ms
|
||||
Burst completed: 5000 events in 340.503526ms
|
||||
Burst completed: 5000 events in 311.944621ms
|
||||
Burst completed: 5000 events in 338.563592ms
|
||||
Burst completed: 5000 events in 306.545393ms
|
||||
Burst completed: 5000 events in 280.038154ms
|
||||
Burst completed: 5000 events in 311.22972ms
|
||||
Burst completed: 5000 events in 292.735765ms
|
||||
Burst test completed: 50000 events in 8.076105474s, errors: 0
|
||||
Events/sec: 6191.10
|
||||
Wiping database between tests...
|
||||
RunMixedReadWriteTest (Badger)..
|
||||
|
||||
=== Mixed Read/Write Test ===
|
||||
Generating 1000 unique synthetic events (minimum 300 bytes each)...
|
||||
Generated 1000 events:
|
||||
Average content size: 312 bytes
|
||||
All events are unique (incremental timestamps)
|
||||
All events are properly signed
|
||||
|
||||
Pre-populating database for read tests...
|
||||
Generating 50000 unique synthetic events (minimum 300 bytes each)...
|
||||
Generated 50000 events:
|
||||
Average content size: 314 bytes
|
||||
All events are unique (incremental timestamps)
|
||||
All events are properly signed
|
||||
|
||||
Mixed test completed: 25000 writes, 25000 reads in 24.581344169s
|
||||
Combined ops/sec: 2034.06
|
||||
Wiping database between tests...
|
||||
RunQueryTest (Badger)..
|
||||
|
||||
=== Query Test ===
|
||||
Generating 10000 unique synthetic events (minimum 300 bytes each)...
|
||||
Generated 10000 events:
|
||||
Average content size: 313 bytes
|
||||
All events are unique (incremental timestamps)
|
||||
All events are properly signed
|
||||
|
||||
Pre-populating database with 10000 events for query tests...
|
||||
@@ -0,0 +1,195 @@
|
||||
Starting Nostr Relay Benchmark (Badger Backend)
|
||||
Data Directory: /tmp/benchmark_rely-sqlite_8
|
||||
Events: 50000, Workers: 24, Duration: 1m0s
|
||||
1763665779574803ℹ️ migrating to version 1... /build/pkg/database/migrations.go:66
|
||||
1763665779574872ℹ️ migrating to version 2... /build/pkg/database/migrations.go:73
|
||||
1763665779574900ℹ️ migrating to version 3... /build/pkg/database/migrations.go:80
|
||||
1763665779574905ℹ️ cleaning up ephemeral events (kinds 20000-29999)... /build/pkg/database/migrations.go:287
|
||||
1763665779574913ℹ️ cleaned up 0 ephemeral events from database /build/pkg/database/migrations.go:332
|
||||
1763665779574927ℹ️ migrating to version 4... /build/pkg/database/migrations.go:87
|
||||
1763665779574932ℹ️ converting events to optimized inline storage (Reiser4 optimization)... /build/pkg/database/migrations.go:340
|
||||
1763665779574942ℹ️ found 0 events to convert (0 regular, 0 replaceable, 0 addressable) /build/pkg/database/migrations.go:429
|
||||
1763665779574947ℹ️ migration complete: converted 0 events to optimized inline storage, deleted 0 old keys /build/pkg/database/migrations.go:538
|
||||
|
||||
╔════════════════════════════════════════════════════════╗
|
||||
║ BADGER BACKEND BENCHMARK SUITE ║
|
||||
╚════════════════════════════════════════════════════════╝
|
||||
|
||||
=== Starting Badger benchmark ===
|
||||
RunPeakThroughputTest (Badger)..
|
||||
|
||||
=== Peak Throughput Test ===
|
||||
2025/11/20 19:09:39 INFO: Extracted embedded libsecp256k1 to /tmp/orly-libsecp256k1/libsecp256k1.so
|
||||
2025/11/20 19:09:39 WARN: Failed to load embedded library from /tmp/orly-libsecp256k1/libsecp256k1.so: Error relocating /tmp/orly-libsecp256k1/libsecp256k1.so: __fprintf_chk: symbol not found, falling back to system paths
|
||||
2025/11/20 19:09:39 INFO: Successfully loaded libsecp256k1 v5.0.0 from system path: libsecp256k1.so.2
|
||||
Events saved: 50000/50000 (100.0%), errors: 0
|
||||
Duration: 3.135436732s
|
||||
Events/sec: 15946.74
|
||||
Avg latency: 1.397968ms
|
||||
P90 latency: 1.930996ms
|
||||
P95 latency: 2.304287ms
|
||||
P99 latency: 3.616715ms
|
||||
Bottom 10% Avg latency: 755.721µs
|
||||
Wiping database between tests...
|
||||
RunBurstPatternTest (Badger)..
|
||||
|
||||
=== Burst Pattern Test ===
|
||||
Burst completed: 5000 events in 303.872847ms
|
||||
Burst completed: 5000 events in 315.659456ms
|
||||
Burst completed: 5000 events in 267.06077ms
|
||||
Burst completed: 5000 events in 307.361928ms
|
||||
Burst completed: 5000 events in 322.693287ms
|
||||
Burst completed: 5000 events in 469.035773ms
|
||||
Burst completed: 5000 events in 312.67366ms
|
||||
Burst completed: 5000 events in 283.102039ms
|
||||
Burst completed: 5000 events in 384.589076ms
|
||||
Burst completed: 5000 events in 420.423539ms
|
||||
Burst test completed: 50000 events in 8.393863388s, errors: 0
|
||||
Events/sec: 5956.73
|
||||
Wiping database between tests...
|
||||
RunMixedReadWriteTest (Badger)..
|
||||
|
||||
=== Mixed Read/Write Test ===
|
||||
Generating 1000 unique synthetic events (minimum 300 bytes each)...
|
||||
Generated 1000 events:
|
||||
Average content size: 312 bytes
|
||||
All events are unique (incremental timestamps)
|
||||
All events are properly signed
|
||||
|
||||
Pre-populating database for read tests...
|
||||
Generating 50000 unique synthetic events (minimum 300 bytes each)...
|
||||
Generated 50000 events:
|
||||
Average content size: 314 bytes
|
||||
All events are unique (incremental timestamps)
|
||||
All events are properly signed
|
||||
|
||||
Mixed test completed: 25000 writes, 25000 reads in 24.674556399s
|
||||
Combined ops/sec: 2026.38
|
||||
Wiping database between tests...
|
||||
RunQueryTest (Badger)..
|
||||
|
||||
=== Query Test ===
|
||||
Generating 10000 unique synthetic events (minimum 300 bytes each)...
|
||||
Generated 10000 events:
|
||||
Average content size: 313 bytes
|
||||
All events are unique (incremental timestamps)
|
||||
All events are properly signed
|
||||
|
||||
Pre-populating database with 10000 events for query tests...
|
||||
Query test completed: 375290 queries in 1m0.008468905s
|
||||
Queries/sec: 6253.95
|
||||
Avg query latency: 1.790209ms
|
||||
P95 query latency: 7.345664ms
|
||||
P99 query latency: 11.918719ms
|
||||
Wiping database between tests...
|
||||
RunConcurrentQueryStoreTest (Badger)..
|
||||
|
||||
=== Concurrent Query/Store Test ===
|
||||
Generating 5000 unique synthetic events (minimum 300 bytes each)...
|
||||
Generated 5000 events:
|
||||
Average content size: 313 bytes
|
||||
All events are unique (incremental timestamps)
|
||||
All events are properly signed
|
||||
|
||||
Pre-populating database with 5000 events for concurrent query/store test...
|
||||
Generating 50000 unique synthetic events (minimum 300 bytes each)...
|
||||
Generated 50000 events:
|
||||
Average content size: 314 bytes
|
||||
All events are unique (incremental timestamps)
|
||||
All events are properly signed
|
||||
|
||||
Concurrent test completed: 314061 operations (264061 queries, 50000 writes) in 1m0.003708095s
|
||||
Operations/sec: 5234.03
|
||||
Avg latency: 1.477392ms
|
||||
Avg query latency: 1.464385ms
|
||||
Avg write latency: 1.546088ms
|
||||
P95 latency: 3.780257ms
|
||||
P99 latency: 5.913557ms
|
||||
|
||||
=== Badger benchmark completed ===
|
||||
|
||||
|
||||
================================================================================
|
||||
BENCHMARK REPORT
|
||||
================================================================================
|
||||
|
||||
Test: Peak Throughput
|
||||
Duration: 3.135436732s
|
||||
Total Events: 50000
|
||||
Events/sec: 15946.74
|
||||
Success Rate: 100.0%
|
||||
Concurrent Workers: 24
|
||||
Memory Used: 96 MB
|
||||
Avg Latency: 1.397968ms
|
||||
P90 Latency: 1.930996ms
|
||||
P95 Latency: 2.304287ms
|
||||
P99 Latency: 3.616715ms
|
||||
Bottom 10% Avg Latency: 755.721µs
|
||||
----------------------------------------
|
||||
|
||||
Test: Burst Pattern
|
||||
Duration: 8.393863388s
|
||||
Total Events: 50000
|
||||
Events/sec: 5956.73
|
||||
Success Rate: 100.0%
|
||||
Concurrent Workers: 24
|
||||
Memory Used: 196 MB
|
||||
Avg Latency: 1.477472ms
|
||||
P90 Latency: 2.319807ms
|
||||
P95 Latency: 2.825169ms
|
||||
P99 Latency: 4.502502ms
|
||||
Bottom 10% Avg Latency: 595.131µs
|
||||
----------------------------------------
|
||||
|
||||
Test: Mixed Read/Write
|
||||
Duration: 24.674556399s
|
||||
Total Events: 50000
|
||||
Events/sec: 2026.38
|
||||
Success Rate: 100.0%
|
||||
Concurrent Workers: 24
|
||||
Memory Used: 142 MB
|
||||
Avg Latency: 387.12µs
|
||||
P90 Latency: 808.479µs
|
||||
P95 Latency: 902.999µs
|
||||
P99 Latency: 1.121415ms
|
||||
Bottom 10% Avg Latency: 1.032694ms
|
||||
----------------------------------------
|
||||
|
||||
Test: Query Performance
|
||||
Duration: 1m0.008468905s
|
||||
Total Events: 375290
|
||||
Events/sec: 6253.95
|
||||
Success Rate: 100.0%
|
||||
Concurrent Workers: 24
|
||||
Memory Used: 114 MB
|
||||
Avg Latency: 1.790209ms
|
||||
P90 Latency: 5.42081ms
|
||||
P95 Latency: 7.345664ms
|
||||
P99 Latency: 11.918719ms
|
||||
Bottom 10% Avg Latency: 8.275871ms
|
||||
----------------------------------------
|
||||
|
||||
Test: Concurrent Query/Store
|
||||
Duration: 1m0.003708095s
|
||||
Total Events: 314061
|
||||
Events/sec: 5234.03
|
||||
Success Rate: 100.0%
|
||||
Concurrent Workers: 24
|
||||
Memory Used: 137 MB
|
||||
Avg Latency: 1.477392ms
|
||||
P90 Latency: 2.984261ms
|
||||
P95 Latency: 3.780257ms
|
||||
P99 Latency: 5.913557ms
|
||||
Bottom 10% Avg Latency: 4.281848ms
|
||||
----------------------------------------
|
||||
|
||||
Report saved to: /tmp/benchmark_rely-sqlite_8/benchmark_report.txt
|
||||
AsciiDoc report saved to: /tmp/benchmark_rely-sqlite_8/benchmark_report.adoc
|
||||
|
||||
RELAY_NAME: rely-sqlite
|
||||
RELAY_URL: ws://rely-sqlite:3334
|
||||
TEST_TIMESTAMP: 2025-11-20T19:12:57+00:00
|
||||
BENCHMARK_CONFIG:
|
||||
Events: 50000
|
||||
Workers: 24
|
||||
Duration: 60s
|
||||
Reference in New Issue
Block a user