input-output-hk / mithril

Stake-based threshold multi-signatures protocol
https://mithril.network
Apache License 2.0
123 stars 39 forks source link

Implement database connection pooling for Cardano transaction store #1761

Closed jpraynaud closed 3 months ago

jpraynaud commented 3 months ago

Content

This PR includes the implementation of a database connection pooling for the store of the Cardano transaction repository.

Benchmarks

Screenshot from 2024-06-18 09-30-25

Total Requests Concurrency Transactions/Request MKMap Pool (x50): Request/s MKMap Pool (x50) + Database connection pool (x10): Request/s
1000 100 1 1385.94 8021.69
1000 100 2 478.92 4465.24
1000 100 3 297.35 2820.16
1000 100 4 257.99 2517.21
1000 100 5 165.21 1588.88
1000 100 6 141.69 1424.89
1000 100 7 115.37 1209.83
1000 100 8 108.2 1110.13
1000 100 9 87.5 937.6
1000 100 10 84.58 903.11
1000 100 20 38 427.45
1000 100 30 29.33 319.36
1000 100 40 23.75 257.53
1000 100 50 18.13 191.57
1000 100 60 15.39 161.08
1000 100 70 12.76 138.76
1000 100 80 11.15 119.57
1000 100 90 10.25 110.43
1000 100 100 9.15 98.07

Running on Linux / 8 cores / 64 GB RAM / 2 TB SSD

Pre-submit checklist

Issue(s)

Closes #1760

github-actions[bot] commented 3 months ago

Test Results

    4 files  ±0     51 suites  ±0   8m 39s :stopwatch: ±0s 1 079 tests +1  1 079 :white_check_mark: +1  0 :zzz: ±0  0 :x: ±0  1 227 runs  +1  1 227 :white_check_mark: +1  0 :zzz: ±0  0 :x: ±0 

Results for commit c153037c. ± Comparison against base commit 727e7cde.

:recycle: This comment has been updated with latest results.