March 23rd 2022
Summary
This test was done to measure the SC ERC20 token transfers, SC ERC721 token minting and EOA to EOA transactions functionality with heavy loads and speed of the transactions on the nodes with higher hardware resources.
The goal was to check if everything is working as expected during heavy loads. That was also the reason we’ve introduced gas metrics in the loadbot output, which show us if the blocks are filled with transactions properly.
All transactions were sent to the single node via GRPC API, and the receipts were received via JSON-RPC API. After all transactions were done, gas information was read from each block, using the eth_getBlockByNumber JSON-RPC method.
Our aim was to strive to reach a maximum possible TPS on the hardware resources available. To acheive this, we've modified the block gas limit and block time parameters, to give us the best possible tps results and keep the system integrity and stability.
Block Gas Limit
Block gas limit can be increased to a relatively high number if the transactions are using a lot of gas to execute. In the example stated bellow, ERC721 token minting worked much faster with a block gas limit set to 80 000 000 ( instead of 20 Mil. ), but with ERC20 token transfers with 80 Mil. block gas limit, the server crashed.
Production Environments
When configuring a production environment, you need to be carefull if you're trying to acheive high performance of the chain. If block gas limit parameter is set to a high value, block time is set to 1s, and there is a high transaction load on a single node, that node will consume a lot ( if not all available ) RAM and can cause server crash. Use the loadbot to test everything thoroughly, monitor the system resource utilization and set your configuration parameters accordingly.
Out of Memory Errors
Some linux distros will automaticaly kill the process that has a very high RAM usage ( OOM error ) , in order to preserve the system stability. The log output of this OOM error looks something like bellow.
Mar 23 00:19:06 ip-10-151-2-196 kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/,task=polygon-edge,pid=4560,uid=1000Mar 23 00:19:06 ip-10-151-2-196 kernel: Out of memory: Killed process 4560 (polygon-edge) total-vm:16687652kB, anon-rss:14964372kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:29668kB oom_score_adj:0Mar 23 00:19:06 ip-10-151-2-196 kernel: oom_reaper: reaped process 4560 (polygon-edge), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Results of EOA to EOA transfers
Metric | Value |
---|---|
Transaction type | EOA to EOA |
Transactions per second | 689 |
Transactions failed | 0 |
Transactions succeeded | 20000 |
Total blocks used | 25 |
Total run time | 29.921110s |
Results of ERC20 token transfers
Metric | Value |
---|---|
Transaction type | ERC20 |
Transactions per second | 500 |
Transactions failed | 0 |
Transactions succeeded | 20000 |
Total blocks used | 33 |
ERC20 transaction run time | 40.402900s |
SC Deploy time | 2.004140s |
Results of ERC721 token minting
Metric | Value |
---|---|
Transaction type | ERC721 |
Transactions per second | 157 |
Transactions failed | 0 |
Transactions succeeded | 20000 |
Total blocks used | 124 |
ERC721 transaction run time | 127.537340s |
SC Deploy time | 2.004420s |
Results of ERC721 token minting with a very high block gas limit (80 Mil.)
Metric | Value |
---|---|
Transaction type | ERC721 |
Transactions per second | 487 |
Transactions failed | 0 |
Transactions succeeded | 20000 |
Total blocks used | 34 |
ERC721 transaction run time | 41.098410s |
SC Deploy time | 2.004300s |