Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue #3487

Closed
sudo1991 opened this issue Feb 23, 2022 · 4 comments
Closed

Performance issue #3487

sudo1991 opened this issue Feb 23, 2022 · 4 comments

Comments

@sudo1991
Copy link

sudo1991 commented Feb 23, 2022

@macfarla This is the test result requested by #3373.

Is this the limit of besu's performance?

I tested by setting
Transaction Gas Limit = 1,000,000,000
blockperiodseconds=2
requesttimeoutseconds=4

  1. Block Gas Limit = 9,007,199,254,740,991 / 5 transactions per second, 400 in total.
  2. Block Gas Limit = 9,007,199,254,740,991 / 20 transactions per second, 400 in total.
  3. Block Gas Limit = 10,000,000,000 / 75 transactions per second, 400 in total.

Result:
1.
start: 2022-02-22 14:23:46,373 INFO o.a.j.e.StandardJMeterEngine: Running the test!
end: 2022-02-22 15:48:39.605+09:00 | EthScheduler-Workers-3 | INFO | PersistBlockTask | Imported #161 / 109 tx / 0 om / 1,807,636,604 (0.0%) gas / (0x6a127fe785bbbe8bcfe536a6eead0f9523a1bd78f8e83ecdaba1ce15496c1ac7) in 1.222s. Peers: 3

2022-02-22 14:23:50.240+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #152 / 20 tx / 10 pending / 23,604,836 (0.0%) gas / (0x162c75e6f08643deb436c17e89adfa247af15a52259d3567ee5a8469ce037d1b)
2022-02-22 14:23:51.955+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Produced #153 / 10 tx / 10 pending / 19,038,292 (0.0%) gas / (0xc2014dd60d2ce30c7892058f1466171a0e65e46aabe27ce52a6caab121a38f1b)
2022-02-22 14:23:53.674+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #154 / 10 tx / 10 pending / 18,589,264 (0.0%) gas / (0xd2e51243b3634c1a47943e8bd3706d0718d44b47e8bbe768ab98ac5a626ae212)
2022-02-22 14:23:53.675+09:00 | EthScheduler-Workers-2 | INFO | PersistBlockTask | Imported #154 / 10 tx / 0 om / 18,589,264 (0.0%) gas / (0xd2e51243b3634c1a47943e8bd3706d0718d44b47e8bbe768ab98ac5a626ae212) in 0.013s. Peers: 3
2022-02-22 14:23:56.170+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #155 / 10 tx / 10 pending / 23,731,353 (0.0%) gas / (0xc3b6c1236c3bc2c5615d4bc3a44eb9c985e38e8364b07872132e29045239dfd6)
2022-02-22 14:23:58.695+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #156 / 10 tx / 10 pending / 25,909,211 (0.0%) gas / (0xc1e5da085dd7d2131fb903e863675ce0efc0e1beb0de05600071e43fef3a8d81)
2022-02-22 14:23:58.696+09:00 | EthScheduler-Workers-0 | INFO | PersistBlockTask | Imported #156 / 10 tx / 0 om / 25,909,211 (0.0%) gas / (0xc1e5da085dd7d2131fb903e863675ce0efc0e1beb0de05600071e43fef3a8d81) in 0.001s. Peers: 3
2022-02-22 14:24:01.407+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Produced #157 / 10 tx / 19 pending / 27,622,494 (0.0%) gas / (0xbface2208c8759fd2362b5ef0296e02ddb2ca681782a19f8b739495cf0e1856d)
2022-02-22 14:24:07.047+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #158 / 19 tx / 21 pending / 54,024,791 (0.0%) gas / (0x602b6e3365c0e25c9cfe4d3869e3db6f1419092a71fa1a4dc1715d1f5f7d7baa)
2022-02-22 14:24:07.048+09:00 | EthScheduler-Workers-2 | INFO | PersistBlockTask | Imported #158 / 19 tx / 0 om / 54,024,791 (0.0%) gas / (0x602b6e3365c0e25c9cfe4d3869e3db6f1419092a71fa1a4dc1715d1f5f7d7baa) in 0.012s. Peers: 3
2022-02-22
14:24:12.748+09:00 | EthScheduler-Workers-1 | INFO | PersistBlockTask | Imported #159 / 21 tx / 0 om / 51,551,605 (0.0%) gas / (0xc55968ca81501a980e21b2e4da78f594630be900b547e579e83412196bc53cb3) in 0.023s. Peers: 3
2022-02-22 14:24:12.748+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #159 / 21 tx / 30 pending / 51,551,605 (0.0%) gas / (0xc55968ca81501a980e21b2e4da78f594630be900b547e579e83412196bc53cb3)
2022-02-22 14:54:02.410+09:00 | pool-8-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=160, Round=8}, hash=0x2a9f52dbc15c669c295a0dd2eeb1119a0548d89ef72821a6a2d9b0a811b88216
2022-02-22 14:55:58.616+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #160 / 181 tx / 109 pending / 1,527,252,909 (0.0%) gas / (0x2a9f52dbc15c669c295a0dd2eeb1119a0548d89ef72821a6a2d9b0a811b88216)
2022-02-22 15:44:51.084+09:00 | pool-8-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=161, Round=9}, hash=0x6a127fe785bbbe8bcfe536a6eead0f9523a1bd78f8e83ecdaba1ce15496c1ac7
2022-02-22 15:48:39.605+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #161 / 109 tx / 0 pending / 1,807,636,604 (0.0%) gas / (0x6a127fe785bbbe8bcfe536a6eead0f9523a1bd78f8e83ecdaba1ce15496c1ac7)
2022-02-22 15:48:39.605+09:00 | EthScheduler-Workers-3 | INFO | PersistBlockTask | Imported #161 / 109 tx / 0 om / 1,807,636,604 (0.0%) gas / (0x6a127fe785bbbe8bcfe536a6eead0f9523a1bd78f8e83ecdaba1ce15496c1ac7) in 1.222s. Peers: 3`

start: 2022-02-22 16:13:26,675 INFO o.a.j.e.StandardJMeterEngine: Running the test!
end: 2022-02-23 02:03:07.732+09:00 | pool-8-thread-1 | INFO |

2022-02-22 16:13:24.032+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #560 / 0 tx / 0 pending / 0 (0.0%) gas / (0x0fc22bb2eb04597574ba4c3a8eefb7da7d6423e2a1dcb21d8515f610bec8d2d8)
2022-02-23 01:15:35.233+09:00 | pool-8-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=561, Round=12}, hash=0xdf883c1a0ff2e4fe711bcdcb75e87260684681f3a7f859738195a0e19c1e04e5
2022-02-23 02:03:07.732+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Produced #561 / 400 tx / 0 pending / 12,843,261,226 (0.0%) gas / (0xdf883c1a0ff2e4fe711bcdcb75e87260684681f3a7f859738195a0e19c1e04e5)

start: 2022-02-23 11:18:55,928 INFO o.a.j.e.StandardJMeterEngine: Running the test!
end: 2022-02-23 13:07:32.271+09:00 | pool-8-thread-1 | INFO |

2022-02-23 11:18:56.019+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #52 / 0 tx / 0 pending / 0 (0.0%) gas / (0x40fefcbec1f4c1e325340c6eb1826a6d4e5a36739b9bbe51d243610b6291821e)
2022-02-23 12:59:33.825+09:00 | pool-8-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=53, Round=10}, hash=0xa3c817268308cd9d9e8a0ac0f3c725774d7b26bdb4c5cd853fac847824467693
2022-02-23 13:07:32.271+09:00 | pool-8-thread-1 | INFO | IbftBesuControllerBuilder | Imported #53 / 400 tx / 0 pending / 4,308,298,326 (43.1%) gas / (0xa3c817268308cd9d9e8a0ac0f3c725774d7b26bdb4c5cd853fac847824467693)

@macfarla
Copy link
Contributor

Hi @SeongUkJeon, that's awesome, you found some interesting things with your testing. With IBFT2 and blockchain in general, a lot depends on your individual environment - network latency, hardware, etc.

It looks like you've made some headway to finding the optimal tuning settings for your environment.
From here, you could try

  • increasing the blockperiodseconds - 2s is still quite short.
  • decreasing the block gas limit - the higher this value, the bigger the blocks will be and the longer it will take to produce and sign them.
    It depends on your use case too - if bigger blocks is going to make your life easier, then you will need to increase the blockperiodseconds. If you are aiming for more smaller, more frequent blocks, then you will need to decrease the block size (block gas limit).

@sudo1991
Copy link
Author

@macfarla
Thank you for your answer.

As we continue to test, we will find the appropriate optimal value.
If there is a problem, I will contact here again.

Thanks once again.

@sudo1991 sudo1991 reopened this Mar 14, 2022
@sudo1991
Copy link
Author

sudo1991 commented Mar 14, 2022

@macfarla
Hi,
I found the right value.
It is blockperiodseconds 30 and block gasLimit 10,000,000,000.
I have a question here.

What is the relationship between blockperiodseconds and block size?
If blockperiodseconds are low, even a few transactions should be written to the block and mined, but why can't besu create any blocks? Is it a bug?

@macfarla
Copy link
Contributor

Glad you found the right value for you environment!
There's no direct relationship between blockperiodseconds and block size - it's more that if the block takes longer to produce, there will be more transactions in it. There's a limit on block size which is measured in gas.

If blockperiodseconds is too low, there isn't enough time for the validators to exchange the messages required to agree on the block. This depends mostly on network latency - how long does it take for the validators to exchange messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants