Streaming events#1808
Conversation
f3762c6 to
53a0ff3
Compare
Transaction cost differencesNo cost or size differences found |
Transaction costsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Script summary
|
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 6093 | 10.80 | 3.35 | 0.53 |
| 2 | 6294 | 13.04 | 4.04 | 0.56 |
| 3 | 6495 | 15.71 | 4.88 | 0.60 |
| 5 | 6895 | 20.07 | 6.21 | 0.66 |
| 10 | 7904 | 31.40 | 9.68 | 0.82 |
| 40 | 13935 | 98.61 | 30.29 | 1.78 |
Commit transaction costs
This uses ada-only outputs for better comparability.
| UTxO | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 561 | 2.44 | 1.16 | 0.20 |
| 2 | 739 | 3.38 | 1.73 | 0.22 |
| 3 | 914 | 4.36 | 2.33 | 0.24 |
| 5 | 1280 | 6.41 | 3.60 | 0.28 |
| 10 | 2179 | 12.13 | 7.25 | 0.40 |
| 54 | 10062 | 98.61 | 68.52 | 1.88 |
CollectCom transaction costs
| Parties | UTxO (bytes) | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|---|
| 1 | 56 | 528 | 26.44 | 7.58 | 0.44 |
| 2 | 114 | 636 | 35.86 | 10.21 | 0.54 |
| 3 | 171 | 751 | 43.49 | 12.44 | 0.62 |
| 4 | 226 | 862 | 56.48 | 15.93 | 0.76 |
| 5 | 282 | 969 | 65.59 | 18.50 | 0.86 |
| 6 | 340 | 1081 | 69.38 | 19.76 | 0.90 |
| 7 | 394 | 1192 | 84.78 | 24.00 | 1.06 |
Cost of Increment Transaction
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 1822 | 25.42 | 8.32 | 0.50 |
| 2 | 1988 | 27.70 | 9.79 | 0.53 |
| 3 | 2084 | 28.69 | 10.66 | 0.55 |
| 5 | 2411 | 33.14 | 13.44 | 0.62 |
| 10 | 3229 | 45.45 | 20.82 | 0.81 |
| 37 | 7127 | 95.30 | 54.73 | 1.63 |
Cost of Decrement Transaction
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 600 | 23.99 | 7.61 | 0.43 |
| 2 | 696 | 23.76 | 8.19 | 0.43 |
| 3 | 867 | 26.49 | 9.61 | 0.47 |
| 5 | 1135 | 29.63 | 11.81 | 0.52 |
| 10 | 1937 | 41.22 | 18.34 | 0.70 |
| 37 | 5826 | 93.14 | 50.65 | 1.52 |
Close transaction costs
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 700 | 29.15 | 9.21 | 0.48 |
| 2 | 771 | 32.89 | 10.93 | 0.53 |
| 3 | 930 | 34.75 | 12.17 | 0.56 |
| 5 | 1259 | 37.18 | 14.41 | 0.61 |
| 10 | 2061 | 50.83 | 22.12 | 0.81 |
| 32 | 5133 | 95.82 | 50.81 | 1.52 |
Contest transaction costs
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 629 | 35.29 | 10.70 | 0.54 |
| 2 | 806 | 38.19 | 12.33 | 0.58 |
| 3 | 984 | 41.07 | 13.96 | 0.63 |
| 5 | 1278 | 45.29 | 16.57 | 0.69 |
| 10 | 2095 | 58.47 | 24.19 | 0.89 |
| 26 | 4478 | 96.26 | 46.73 | 1.46 |
Abort transaction costs
There is some variation due to the random mixture of initial and already committed outputs.
| Parties | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|
| 1 | 5986 | 28.33 | 9.33 | 0.71 |
| 2 | 6091 | 37.32 | 12.30 | 0.81 |
| 3 | 6248 | 46.92 | 15.46 | 0.92 |
| 4 | 6454 | 57.76 | 19.17 | 1.04 |
| 5 | 6580 | 67.85 | 22.42 | 1.15 |
| 6 | 6709 | 73.91 | 24.44 | 1.22 |
| 7 | 6696 | 82.65 | 27.25 | 1.31 |
| 8 | 6826 | 91.19 | 30.10 | 1.40 |
FanOut transaction costs
Involves spending head output and burning head tokens. Uses ada-only UTXO for better comparability.
| Parties | UTxO | UTxO (bytes) | Tx size | % max Mem | % max CPU | Min fee ₳ |
|---|---|---|---|---|---|---|
| 10 | 0 | 0 | 6091 | 19.86 | 6.53 | 0.63 |
| 10 | 1 | 57 | 6126 | 21.33 | 7.13 | 0.64 |
| 10 | 5 | 284 | 6261 | 30.31 | 10.59 | 0.75 |
| 10 | 10 | 570 | 6431 | 40.96 | 14.72 | 0.87 |
| 10 | 20 | 1140 | 6771 | 62.72 | 23.14 | 1.12 |
| 10 | 30 | 1709 | 7112 | 84.42 | 31.54 | 1.37 |
| 10 | 37 | 2104 | 7347 | 98.48 | 37.03 | 1.54 |
End-to-end benchmark results
This page is intended to collect the latest end-to-end benchmark results produced by Hydra's continuous integration (CI) system from the latest master code.
Please note that these results are approximate as they are currently produced from limited cloud VMs and not controlled hardware. Rather than focusing on the absolute results, the emphasis should be on relative results, such as how the timings for a scenario evolve as the code changes.
Generated at 2025-02-06 15:09:57.761532918 UTC
Baseline Scenario
| Number of nodes | 1 |
|---|---|
| Number of txs | 300 |
| Avg. Confirmation Time (ms) | 5.192261353 |
| P99 | 14.733979309999985ms |
| P95 | 7.186082700000006ms |
| P50 | 4.7220705ms |
| Number of Invalid txs | 0 |
| Memory data |
2025-02-06 15:08:32.847071201 UTC
Used: 939M, Free: 6116M
2025-02-06 15:08:37.847023361 UTC
Used: 1047M, Free: 5916M
2025-02-06 15:08:42.846994108 UTC
Used: 1048M, Free: 5914M
2025-02-06 15:08:47.846902344 UTC
Used: 1055M, Free: 5906M
2025-02-06 15:08:52.846881424 UTC
Used: 1055M, Free: 5906M
2025-02-06 15:08:57.846892693 UTC
Used: 1060M, Free: 5901M
Three local nodes
| Number of nodes | 3 |
|---|---|
| Number of txs | 900 |
| Avg. Confirmation Time (ms) | 26.191480528 |
| P99 | 47.3472604199996ms |
| P95 | 36.33433719999999ms |
| P50 | 24.0095065ms |
| Number of Invalid txs | 0 |
| Memory data |
2025-02-06 15:09:10.809246665 UTC
Used: 995M, Free: 5978M
2025-02-06 15:09:15.809568831 UTC
Used: 1170M, Free: 5802M
2025-02-06 15:09:20.809472768 UTC
Used: 1187M, Free: 5783M
2025-02-06 15:09:25.809595253 UTC
Used: 1195M, Free: 5775M
2025-02-06 15:09:30.810608024 UTC
Used: 1232M, Free: 5673M
2025-02-06 15:09:35.809475515 UTC
Used: 1270M, Free: 5552M
2025-02-06 15:09:40.809429508 UTC
Used: 1283M, Free: 5538M
2025-02-06 15:09:45.80958518 UTC
Used: 1283M, Free: 5538M
2025-02-06 15:09:50.809549363 UTC
Used: 1295M, Free: 5524M
2025-02-06 15:09:55.809471116 UTC
Used: 1298M, Free: 5521M
c4691d0 to
3081fdd
Compare
ba89a14 to
4dda719
Compare
22011b5 to
7da0e32
Compare
df30737 to
79e4471
Compare
This requires MonadUnliftIO on hydrate and createNode functions to run the conduits. However, the io-sim tests' IOSim s monad does not have an instance!
This re-loading the same server outputs 3 times though.
Instead of running the conduits (which would require runResourceT), we just construct the 'DraftHydraNode' directly.
Mistakenly used fuseBoth instead of zipSinks
This avoids redundant definitions at the cost of not having all functions bound in the handle.
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
79e4471 to
7affa77
Compare
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Changes I made originally for the
hydra-doomproject to load all events instate(12GB+ in that use case) with constant memory usingconduitstreams.There is a big TODO on this:IOSim sdoes not have aMonadUnliftIOinstance and its not impossible to have one. We need to change the interface further such that we can composecreateHydraNodeandhydratefunctions with in-memoryEventSourcevariants.A bit of a wart: ThemkProjectiondoes run the conduit for each projection, instead we should run the conduit once and build the projected in-memory read/query model once.Also, the change here is not constant-memory as the
ServerOutputhistory is still kept fully in memory. But this is a different story and should be covered by #1618