You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RSpace data is stored as a collection of key-value pairs (tuple space). For each distinct state of this collection we should be able to calculate a hash to uniquely define it and to provide a way to verify the integrity of the data.
Implementation of Merkle-Patricia Trie is used for this purpose in RNode (currently v0.10.2) written in class. It's implementation of History interface with two basic operations, to update (process) and read key-value pairs.
In its core it's a Radix Tree structure that enables storing keys in a tree with branch nodes representing common key prefixes and with leaf nodes holding values. Each node has a key which is hash of its children nodes (references).
Test conditions
System parameters: CPU - AMD Ryzen™ 7 3700U, RAM - 16GB DDR4, SSD - M.2 PCIe 3.0x2
Java heap size 2048MB
Average - 10 experiences
WarmUp - 10 first experiences
Data sets - random (Identical in all experiments)
Comparative testing of different implementations of History
This chapter provides information about performance of insert, read, delete operations and database size. Below are the comparative results of testing 3 implementations of history:
numIRD - number of Insert Read and Delete records;
timeI - insert time;
timeR - read time;
timeD - delete time;
size - size of serialized Data in KVDB after insert
num - number of nodes in KVDB after insert.
RadixHistory perfomance testing
Below are the results of testing implementations of RadixHistory.
A manually created codec is used to serialize the data.
The following code used for testing.
LMDB used as KVDB
numInit
numIRD
timeI(sec)
timeR(sec)
timeD(sec)
1
100000
0.758
0.788
0.45
1
200000
1.629
1.627
0.793
1
300000
2.494
2.389
1.416
1
400000
3.297
3.319
2.022
1
500000
4.671
4.161
2.494
1
600000
4.943
4.753
2.936
1
700000
5.225
5.391
3.594
1
800000
6.263
6.519
4.611
100000
100000
1.333
1.134
0.687
200000
100000
1.627
1.426
0.953
300000
100000
1.915
1.335
1.091
400000
100000
2.461
1.482
1.23
500000
100000
2.536
2.11
1.21
600000
100000
2.797
1.868
1.391
700000
100000
3.05
2.003
1.437
800000
100000
3.498
2.177
1.367
InMemoryKeyValueStore used as KVDB
numInit
numIRD
timeI(sec)
timeR(sec)
timeD(sec)
size(MB)
num
1
100000
0.7
0.692
0.373
7.916
29991
1
200000
1.561
1.309
0.756
15.446
54383
1
300000
2.185
2.244
1.316
22.096
64713
1
400000
2.926
2.747
1.709
28.397
69461
1
500000
3.525
3.964
2.358
34.609
72789
1
600000
3.884
4.097
2.891
40.822
76151
1
700000
4.697
4.793
3.132
47.06
79913
1
800000
5.08
5.674
4.016
53.331
84216
numInit - initial number of records;
numIRD - number of Insert Read and Delete records;
timeI - insert time;
timeR - read time;
timeD - delete time;
size - size of serialized Data in KVDB after insert;
num - number of nodes in KVDB after insert.
Rnode testing (time performance)
We measured the size of the KVDB when we do 1000 deploys to Rnode. In the tests was compared two history implementations RadixHistory and MergingHistory.
List of modifications: Rnode works in memory. Rnode calculates size HistoryStore and returns this size in a log.
I ran Rnode in server as -standalone.
1000 deploys were created with the help of this python script
Overview
RSpace data is stored as a collection of key-value pairs (tuple space). For each distinct state of this collection we should be able to calculate a hash to uniquely define it and to provide a way to verify the integrity of the data.
Implementation of Merkle-Patricia Trie is used for this purpose in RNode (currently v0.10.2) written in class. It's implementation of
History
interface with two basic operations, to update (process
) and read key-value pairs.rchain/rspace/src/main/scala/coop/rchain/rspace/history/History.scala
Lines 12 to 17 in a9c0f7d
In its core it's a Radix Tree structure that enables storing keys in a tree with branch nodes representing common
key
prefixes and with leaf nodes holdingvalues
. Each node has a key which is hash of its children nodes (references).Test conditions
Comparative testing of different implementations of History
This chapter provides information about performance of insert, read, delete operations and database size. Below are the comparative results of testing 3 implementations of history:
The following code was used for testing.
LMDB was used for data storage in time comparison tests.
InMemoryKeyValueStore was used for data storage in data size comparison tests.
Where
RadixHistory perfomance testing
Below are the results of testing implementations of RadixHistory.
A manually created codec is used to serialize the data.
The following code used for testing.
LMDB used as KVDB
InMemoryKeyValueStore used as KVDB
Rnode testing (time performance)
We measured the size of the KVDB when we do 1000 deploys to Rnode. In the tests was compared two history implementations RadixHistory and MergingHistory.
List of modifications: Rnode works in memory. Rnode calculates size HistoryStore and returns this size in a log.
I ran Rnode in server as -standalone.
1000 deploys were created with the help of this python script
InMemoryKeyValueStore was used for data storage.
Rnode testing (LFS and database size)
In the tests was compared two history inplementations RadixHistory and MergingHistory.
InMemoryKeyValueStore was used for data storage.
Sequentially doing 1000 deploy with the help of this python script.
Below is the data on the number of nodes in the database at the moment.
Below is the data on the number of nodes in the LFS of the current block.
Below is the data on database size at the moment.
Below is the data on the size of the LFS of the current block.
Below is the data on the number of nodes in the LFS vs the number of nodes in the database.
Below is the data on the size of the LFS vs on database size.
Rnode testing (History data compression experiments)
We tested this history with and without compression.
The text was updated successfully, but these errors were encountered: