Transaction Generator: Test Cases - input-output-hk/iohk-monitoring-framework GitHub Wiki

This page describes the first benchmarking results of transaction generator.

Working system

The first results was collected on this computer:

  1. CPU: Intel Core i7-7500U 2.70GHz
  2. Memory: 16 GB DDR4 2133 MHz
  3. OS: Debian 10 amd64

Run commands

Run a cluster:

$ cd cardano-node
$ tmux
$ ./scripts/shelley-testnet.sh

Run a generator (in another terminal):

$ cd cardano-node
$ ./scripts/generator.sh --target-node-id 0

Settings #1

  1. Each benchmarking transaction has 1 input and 1 output, with fixed amount of money (100 ADA).
  2. Slot duration = 20 sec.
  3. txNumServiceTime = 0.01 sec.

Settings #2

  1. Each benchmarking transaction has 1 input and 1 output, with fixed amount of money (100 ADA).
  2. Slot duration = 20 sec.
  3. txNumServiceTime = 0

Testing Setup

Build cardano-node with cabal:

$ cd cardano-node
$ cabal new-build all

Then clean previous databases:

$ rm -rf db-*

After that correct scripts/shelley-testnet.sh:

  1. Remove --live-view option (https://github.com/input-output-hk/cardano-node/blob/master/scripts/shelley-testnet.sh#L25)
  2. Redirect all nodes' outputs to tmp-files (https://github.com/input-output-hk/cardano-node/blob/master/scripts/shelley-testnet.sh#L59-L63). These tmp-files will contain all output and we will analyze them later.

Run the cluster:

$ tmux
$ ./scripts/shelley-testnet.sh

Now change CLI arguments in the scripts/generator.sh script (https://github.com/input-output-hk/cardano-node/blob/master/scripts/generator.sh#L21-L26).

Then run tx generator:

$ ./scripts/generator.sh --target-node-id 0

which means that generator will send all transactions to the node 0.

Now wait some time (for example, for 1000 txs it's about 2 minutes), after that we can kill tx generator and all nodes.

Then check those tmp-files which contain output of the nodes. For example, /tmp/NODE1 from node 1, if we generate 1000 txs, check these lines with timestamps:

...
[2019-11-01 08:21:29.54 UTC] txsInMempool = 1
...
[2019-11-01 08:23:11.98 UTC] txsInMempool = 1000
...

Transactions with Additional Size

Please note that these results are from local cluster testing (so there's no real-world network latency).

Number of nodes Number of txs Inputs Outputs Add tx size, bytes Time
3 1000 1 1 0 1:40
3 1000 1 1 128 1:40
3 1000 1 1 256 1:41
3 1000 1 1 512 1:41
3 1000 1 1 1024 1:42
3 1000 1 1 2048 1:45
3 1000 1 1 4096 1:47
3 1000 1 1 8192 1:47
3 1000 1 1 10240 1:48
3 1000 1 1 12288 1:52
3 1000 1 1 14336 1:52

<< Could we please populate the following table as well - I assume that there will be some slight variation in Tx Size, if it is constant please modify appropriately

| Num of Inputs | Num of Outputs | Tx size (mean) | Tx size (var) | Tx Size (min) | Tx Size (max) | | 1 | 1 | | | | |