ssbc / ssb-db2

A new database for secure-scuttlebutt
47 stars 8 forks source link

Throttle #383

Closed arj03 closed 2 years ago

arj03 commented 2 years ago

This takes care of https://github.com/ssbc/ssb-db2/issues/379

arj03 commented 2 years ago

I guess this is technically a major version bump

github-actions[bot] commented 2 years ago

Benchmark results

Part Duration
Create 5000 new messages 371.33ms
Validate 5000 messages 478.05ms
Native to db format 5000 messages 108.59ms
Db to native format 5000 messages 81.02ms
Add 1000 elements 493.77ms
Add 1000 box1 msgs 1002.06ms
Unbox 1000 box1 msgs first run 169.86ms
Unbox 1000 box1 msgs second run 114.50ms
Add 1000 box1 msgs 971.63ms
Query 1000 msgs first run 38.54ms
Query 1000 msgs second run 23.71ms
Add 1000 box2 msgs 1292.02ms
Unbox 1000 box2 msgs first run 217.21ms
Unbox 1000 box2 msgs second run 152.45ms
Migrate (+db1) 11258.28ms
Migrate (alone) 3845.99ms
Migrate (+db1 +db2) 8223.18ms
Migrate (+db2) 5781.20ms
Migrate continuation (+db2) 838.22ms
Memory usage without indexes 751.17 MB = 39.82 MB + etc
Initial indexing 676.20ms
Initial indexing maxcpu=86 4266.54ms
Initial indexing compat 683.77ms
Two indexes updating concurrently 938.89ms
Key one initial 51.56ms
Key two 0.53ms
Key one again 1.37ms
Reboot and key one again 51.47ms
Latest root posts 709.78ms
Latest posts 10.79ms
Votes one initial 522.23ms
Votes again 0.66ms
HasRoot 338.89ms
HasRoot again 0.27ms
Author one posts 471.76ms
Author two posts 15.80ms
Dedicated author one posts 500.66ms
Dedicated author one posts again 0.73ms
DeleteFeed 2658.41ms
Maximum memory usage 1030.96 MB = 63.86 MB + etc
Indexes folder size 10.12mb
github-actions[bot] commented 2 years ago

Benchmark results

Part Duration
Create 5000 new messages 432.45ms
Validate 5000 messages 544.12ms
Native to db format 5000 messages 136.93ms
Db to native format 5000 messages 99.89ms
Add 1000 elements 389.47ms
Add 1000 box1 msgs 1122.67ms
Unbox 1000 box1 msgs first run 210.32ms
Unbox 1000 box1 msgs second run 127.24ms
Add 1000 box1 msgs 1086.27ms
Query 1000 msgs first run 48.38ms
Query 1000 msgs second run 27.23ms
Add 1000 box2 msgs 1510.37ms
Unbox 1000 box2 msgs first run 212.05ms
Unbox 1000 box2 msgs second run 185.18ms
Migrate (+db1) 13271.52ms
Migrate (alone) 4716.71ms
Migrate (+db1 +db2) 10013.66ms
Migrate (+db2) 7337.13ms
Migrate continuation (+db2) 1039.95ms
Memory usage without indexes 765.33 MB = 37.50 MB + etc
Initial indexing 806.28ms
Initial indexing maxcpu=86 4373.42ms
Initial indexing compat 920.60ms
Two indexes updating concurrently 1257.60ms
Key one initial 55.06ms
Key two 1.88ms
Key one again 1.08ms
Reboot and key one again 50.93ms
Latest root posts 938.92ms
Latest posts 10.82ms
Votes one initial 695.54ms
Votes again 1.70ms
HasRoot 463.80ms
HasRoot again 0.52ms
Author one posts 551.54ms
Author two posts 42.06ms
Dedicated author one posts 587.62ms
Dedicated author one posts again 0.47ms
DeleteFeed 3478.79ms
Maximum memory usage 1008.68 MB = 64.17 MB + etc
Indexes folder size 10.01mb
github-actions[bot] commented 2 years ago

Benchmark results

Part Duration
Create 5000 new messages 470.15ms
Validate 5000 messages 584.00ms
Native to db format 5000 messages 142.22ms
Db to native format 5000 messages 104.46ms
Add 1000 elements 395.18ms
Add 1000 box1 msgs 1174.84ms
Unbox 1000 box1 msgs first run 201.45ms
Unbox 1000 box1 msgs second run 135.63ms
Add 1000 box1 msgs 1116.91ms
Query 1000 msgs first run 47.84ms
Query 1000 msgs second run 27.06ms
Add 1000 box2 msgs 1615.82ms
Unbox 1000 box2 msgs first run 265.48ms
Unbox 1000 box2 msgs second run 184.72ms
Migrate (+db1) 14242.14ms
Migrate (alone) 5262.31ms
Migrate (+db1 +db2) 10730.26ms
Migrate (+db2) 7757.34ms
Migrate continuation (+db2) 1224.14ms
Memory usage without indexes 754.02 MB = 37.58 MB + etc
Initial indexing 824.55ms
Initial indexing maxcpu=86 4542.27ms
Initial indexing compat 955.68ms
Two indexes updating concurrently 1285.77ms
Key one initial 57.20ms
Key two 0.58ms
Key one again 2.44ms
Reboot and key one again 54.69ms
Latest root posts 998.49ms
Latest posts 10.68ms
Votes one initial 669.86ms
Votes again 0.64ms
HasRoot 468.60ms
HasRoot again 0.40ms
Author one posts 590.32ms
Author two posts 30.31ms
Dedicated author one posts 600.26ms
Dedicated author one posts again 0.90ms
DeleteFeed 3877.51ms
Maximum memory usage 1012.29 MB = 63.75 MB + etc
Indexes folder size 10.01mb
github-actions[bot] commented 2 years ago

Benchmark results

Part Duration
Create 5000 new messages 542.03ms
Validate 5000 messages 594.34ms
Native to db format 5000 messages 157.95ms
Db to native format 5000 messages 126.49ms
Add 1000 elements 523.84ms
Add 1000 box1 msgs 1332.31ms
Unbox 1000 box1 msgs first run 239.84ms
Unbox 1000 box1 msgs second run 161.68ms
Add 1000 box1 msgs 1243.42ms
Query 1000 msgs first run 52.22ms
Query 1000 msgs second run 28.92ms
Add 1000 box2 msgs 1829.26ms
Unbox 1000 box2 msgs first run 346.34ms
Unbox 1000 box2 msgs second run 255.11ms
Migrate (+db1) 16817.98ms
Migrate (alone) 5909.91ms
Migrate (+db1 +db2) 12780.53ms
Migrate (+db2) 8779.07ms
Migrate continuation (+db2) 1380.61ms
Memory usage without indexes 745.40 MB = 39.48 MB + etc
Initial indexing 975.05ms
Initial indexing maxcpu=86 4830.30ms
Initial indexing compat 1118.81ms
Two indexes updating concurrently 1450.39ms
Key one initial 69.22ms
Key two 3.39ms
Key one again 2.57ms
Reboot and key one again 67.67ms
Latest root posts 1145.94ms
Latest posts 9.48ms
Votes one initial 766.26ms
Votes again 0.76ms
HasRoot 555.00ms
HasRoot again 0.62ms
Author one posts 657.16ms
Author two posts 20.77ms
Dedicated author one posts 655.47ms
Dedicated author one posts again 0.56ms
DeleteFeed 3791.20ms
Maximum memory usage 993.40 MB = 63.12 MB + etc
Indexes folder size 10.01mb