Skip to content

Instantly share code, notes, and snippets.

Last active October 17, 2018 15:45
What would you like to do?
eosio benchmarking notes with txn_test_gen_plugin

This general procedure was used when doing pre-dawn 3.0 performance testing as mentioned in EOSIO/eos#2078.

Network layout: 2 nodes connected to each other on same box, 1 producer, 1 generator
Hardware: AMD Ryzen at 3.9Ghz
Software: Linux 4.15; eosio compiled with Clang6 -O3
Tested on Apr25 2018 on the DAWN-2018-04-23-ALPHA branch

Make an empty directory for our configs & data, mkdir ~/, and define a logging.json that doesn't print debug information (which occurs for each txn) to the console

cat << EOF > ~/
  "includes": [],
  "appenders": [{
      "name": "consoleout",
      "type": "console",
      "args": {
        "stream": "std_out",
        "level_colors": [{
            "level": "debug",
            "color": "green"
            "level": "warn",
            "color": "brown"
            "level": "error",
            "color": "red"
      "enabled": true

  "loggers": [{
      "name": "default",
      "level": "info",
      "enabled": true,
      "additivity": false,
      "appenders": [

Launch producer

$ ./nodeos -d ~/ --config-dir ~/ -l ~/ --http-server-address "" -p eosio -e

Launch non-producer that will generate transactions

$ ./nodeos -d ~/ --config-dir ~/ -l ~/ --plugin eosio::txn_test_gen_plugin --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --p2p-peer-address localhost:9876 --p2p-listen-endpoint localhost:5555

Create a wallet on the non-producer and set bios contract

$ ./cleos wallet create
$ ./cleos set contract eosio ~/eos/build.release/contracts/eosio.bios/ 

Initialize the accounts txn_test_gen_plugin uses

$ curl --data-binary '["eosio", "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]' http://localhost:8888/v1/txn_test_gen/create_test_accounts

Start transaction generation, this will submit 20 transactions evey 20ms (total of 1000TPS)

$ curl --data-binary '["", 20, 20]' http://localhost:8888/v1/txn_test_gen/start_generation

Note the producer console prints

eosio generated block 9b8b851d... #3219 @ 2018-04-25T16:07:47.000 with 500 trxs, lib: 3218
eosio generated block e5b3cd5d... #3220 @ 2018-04-25T16:07:47.500 with 500 trxs, lib: 3219
eosio generated block b243aeaa... #3221 @ 2018-04-25T16:07:48.000 with 500 trxs, lib: 3220

showing 1000TPS. Producer CPU usage is only ~48%

Copy link

great work!
would u please show the config file "config.ini" ?

Copy link

I got below error, my CPU is "Intel(R) Xeon(R) Gold 6161 CPU @ 2.20GHz". Do you know how to fix the error?

2527007ms thread-0 net_plugin.cpp:2339 handle_message ] accept txn threw 3020004 block_resource_exhausted: block exhausted allowed resources
Block has insufficient cpu resources
thread-0 resource_limits.cpp:119 add_transaction_usage

thread-0  chain_controller.cpp:2125 __apply_transaction

thread-0  chain_controller.cpp:2160 _apply_transaction

thread-0  chain_controller.cpp:2361 wrap_transaction_processing

thread-0  chain_controller.cpp:360 _push_transaction

thread-0  chain_controller.cpp:335 _push_transaction

thread-0  chain_controller.cpp:291 push_transaction

Copy link

eoseoul commented Apr 26, 2018

Thank you for video and gist of BlockOne experiment setting. Video and this gist post are very helpful and lead to reproduce 1000 TPS with txn_test_gen plugin on binaryen with full signature checking.

We, EOSeoul, also reproduced sustainable 2000+ TPS with txn_test_gen on wavm with full signature checking. Producer CPU usage with JIT is about 40% on Intel i7-6700 @ 3.4GHz.

We plan to do a lot more tests under more realistic mainnet environment scenarios to share EOSeoul benchmark settings for block producers. When our next report is done, we will post the results again.

Thank you.


Copy link

would u please show the config file "config.ini" ?

Because the config-dir was pointed to a new directory, the default config.ini will be created

Copy link

eoseoul commented May 3, 2018

We have posted 2nd report.

[BMT] 2nd result of EOSIO TPS test by EOSeoul – Verification of Block One test guide and JIT test

Thank you.


Copy link

Hi @spoonincode , I tried this on lastest eos (commit id: 503e0c8e97e02d586f30fb36467e32673ce9ad9b). It shows 800tps(400trxs / 500ms).
See screenshot for detail: Top one is producer, bottom one is generator.
screenshot from 2018-05-24 15-30-53

What makes me confused is that i tested dawn-v3.0.0 on this machine, it easily reach 1000tps, and not only that, when i used EOSBenchTool it can even reach 1900tps.

any ideas about this?

Copy link

@spartucus can you share the config.ini and your cluster configuration. I was trying 3 node setup (1 local + 2 Azure) but was able to achieve max 300 TPS by sending txns using cleos while eosjs was giving 10 TPS, can you share your thoughts on how can I achieve the 1000 TPS you were able to achieve ?

Copy link

@spartucus - How can I achieve the same throughput without the plugin if I send the transactions using the cleos ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment