Note: This page is WIP.
Table of Contents |
---|
Data gathered
https://docs.google.com/spreadsheets/d/1W2UgFUmEbegR7VMsnUi3rrQDAeBYyenILFHH_0YpRdQ/edit?usp=sharing
https://docs.google.com/spreadsheets/d/1Ks75ExHoLx6cxam9DRbztREzG-FpQ6f7RkS6otcYjpI/edit?usp=sharing
https://docs.google.com/spreadsheets/d/1BEQ4IBtftvssiLcdCh7npVuuUGW1DlL_y6031D2lMOw/edit?usp=sharing
Analysis
GNAT
A GNAT holds:
- channels - the name used in to send or receive
- data - produce, send
- continuations - consume, receive
Code Block |
---|
size of leaf + node + skip := (1738 + 90014 + 19134) / 2 /* - replay */ => 55443 |
Data and continuations size
...
- source - checksums for event tracking
- a - produce data
Code Block |
---|
size of data := 7142 / 2 /* (- replay) */ => 3571 (100%)
size of a := 6372 / 2 => 3181 (89%)
size of source := 690 / 2 => 345 (10%) |
Deeper dive into the AST
based on "analysis of data on transfer 3"
Code Block |
---|
size of A in Data := 3185
size of pars := 2689 (84%)
size of top level random state := 494 (16%) |
Continuations cost
Transfer from Bob to Alice
...
- continuation - consume data
- source - checksums for event tracking
- patterns - used for spatial matching
Size of continuations being shuffled during a transfer:
Code Block |
---|
size of wks := 10372 / 2 /*(- replay)*/ => 5186 (100%)
size of continuations in wks := 7692 / 2 => 3946 (76%)
size of source := 1606 / 2 => 803 (15%)
size of patterns := 1106 / 2 => 503 (10%)
|
Deeper dive into the AST
based on "analysis of data on transfer 3"
Code Block |
---|
size of wks := 5 186
size of continuation par := 2 536 (50%)
size of continuation top level random := 1 088 (20%)
size of patterns := 553 (10%)
size of source := 804 (16%) |
Trie size
Leaf cost
Leafs are cheap themselves, the data usage comes from the size of data stored.
Skip cost
Skip nodes take up 1.7kb for 90kb of pointerblocks.
Code Block |
---|
size of skip := 1738 / 2 /* -replay */ => 869 |
Node cost
Other data
...
Code Block |
---|
size of node:pointerblocks := 89984 / 2 /* (- replay) */ => 44992 |
Size on disk
LMDB
Code Block |
---|
observed size on disk := 102400 / 2 /* (-replay) */ => 51200 |
Observations
% of total | |
---|---|
leaf | 17% |
leaf:data | 6% |
leaf:continuation | 9% |
node | 81% |
skip | 2% |
Takeaways/next steps
- Work through checkpoint creation (1 step instead of 13 steps) which would reduce the amount of stored tries (less data)
Jira Legacy server System JIRA serverId 50130123-f232-3df4-bccb-c16e7d83cd3e key RCHAIN-3415 - estimated gain:
- store of top level pointerblock (4416 + 4512 + 128) instead of 44992 (80%)
- note: this calculation is very imprecise as the change will happen (is possible) in next rspace
- Address EmptyPointer stored in Node pointer block.
Jira Legacy server System JIRA serverId 50130123-f232-3df4-bccb-c16e7d83cd3e key RCHAIN-3226 - encode pointer type in 2 bits, not in 8 bits
- explore gain from storing sparse vectors
- estimated gain:
- Continue analysis of rholang AST
- we can address the source size (which is constant but it constitutes a 10% or 15% of the data stored)
- there is no way of addressing the random state