BSC synchronization issues
Description
In the 24 hours of July 28, Binance Smart Chain (BSC) processed 12.9 million transactions. This number and the below numbers are all from the great BSC network explorer bscscan.com powered by the Etherscan team.
This means 150 transactions per second (TPS) processed on the mainnet, not in isolated environment tests or white paper. If we zoom in, we will also notice that these were not light transactions as BNB or BEP20 transfers, but heavy transactions, as many users were "fighting" each other in the “Play and Earn”, which is majorly contributed by GameFi dApps from MVBII.
The total gas used on July 28 was 2,052,084 million. If all these were for a simple BEP20 transaction that typically cost 50k gas, it could cover 41 millions transactions, and stand for 470 TPS.
On the other hand, with the flood of volume, the network experienced congestion on July 28 for about 4 hours, and many low spec or old version nodes could not catch up with processing blocks in time.
Updates
A new version of beta client is released which has better performance in order to handle the high volume. Please feel free to upgrade and raise bug reports if you encounter any. Please note this is just a beta version, some known bug fix is on the way. Click here to download the beta client.
To improve the performance of nodes and achieve faster block times, we recommend the following specifications.
- validator:
- 2T GB of free disk space, solid-state drive(SSD), gp3, 8k IOPS,
250MB/S throughput,read latency <1ms. - 12 cores of CPU and 48 gigabytes of memory (RAM)
- m5zn.3xlarge instance type on AWS, or c2-standard-8 on Google cloud.
- A broadband Internet connection with upload/download speeds of 10 megabyte per second
- 2T GB of free disk space, solid-state drive(SSD), gp3, 8k IOPS,
- fullnode:
- 1T GB of free disk space, solid-state drive(SSD), gp3, 3k IOPS,
125MB/S throughput,read latency <1ms. (if start with snap/fast sync, it will needNVMe SSD) - 8 cores of CPU and 32 gigabytes of memory (RAM).
- c5.4xlarge instance type on AWS, c2-standard-8 on Google cloud.
- A broadband Internet connection with upload/download speeds of 5 megabyte per second
- 1T GB of free disk space, solid-state drive(SSD), gp3, 3k IOPS,
If you don’t need an archive node, choose the latest snapshot and rerun from scratch from there.
Problems
- Fast/snap sync mode cannot catch up with the current state data.
- Full sync cannot catch up with the current block.
- High CPU usage.
Suggestions
- Use the latest released binary version.
- Don't use fast/snap sync for now, use the snapshot we provide to run full sync.
- Confirm your hardware is sufficient, you can refer to our official documents (we will update if there are new discoveries).
- Regularly prune data to reduce disk pressure.
- Make sure the peer you connect to is not too slow.
Reference PRs
- #257
- #333
We will update this board, If there are any updates. If you have a suggestion or want to propose some improvements, please visit our Github. If you encounter any synchronization issues, please report them here.
I updated to latest binary 1.1.1-beta. my hardware CPU 36, RAM 72, GP3 10000 IOPS, 1000 MB/S now block is behind 1 days 23 hours. block generation 2~3 / 10 seconds. what is issue? this is my geth command ./build/bin/geth --config ./config.toml --datadir ./node --gcmode archive --syncmode=full --snapshot=false --http.vhosts=* --cache=18000 --cache.preimages --rpc.allow-unprotected-txs --txlookuplimit 0 console
I updated to latest binary 1.1.1-beta. my hardware CPU 36, RAM 72, GP3 10000 IOPS, 1000 MB/S now block is behind 1 days 23 hours. block generation 2~3 / 10 seconds. what is issue? this is my geth command ./build/bin/geth --config ./config.toml --datadir ./node --gcmode archive --syncmode=full --snapshot=false --http.vhosts=* --cache=18000 --cache.preimages --rpc.allow-unprotected-txs --txlookuplimit 0 console
my experience with a few archive nodes
once cold start running for some time, it stables down at rate of
nvme raid0 [3-4 blocks 8 - 12s] <<< catch up very very slowly
gp3 raid0 aws gp3 1000MB/s 16000iops [2-3 blocks 9 - 13s] <<< shall not catch up in recent blocks
after 1.1.1-beta, it seems a bit better , i am seeing 5-6 blocks in ~9s, which allows node catching up a bit faster
Hi @kgcdream2019, Could you please provide some logs and Disk's mertics data? Maybe we can see some clues from it. In addition, have you tried pruning data? Pruning some data to reduce disk usage may help.
how to check if a peer is slow? maybe i can drop slow peers manually and only keep fast peers.
Hi @kgcdream2019, Could you please provide some logs and Disk's mertics data? Maybe we can see some clues from it. In addition, have you tried pruning data? Pruning some data to reduce disk usage may help.
t=2021-07-30T08:57:26+0000 lvl=info msg="Imported new chain segment" blocks=2 txs=1046 mgas=169.139 elapsed=10.183s mgasps=16.609 number=9,542,712 hash=0xd7c612264bc67ab77fc777989917b7c4740905dd161bf77599327346d35e3980 age=2d1h5m dirty="6.80 MiB" t=2021-07-30T08:57:29+0000 lvl=info msg="Deep froze chain segment" blocks=12 elapsed=36.281ms number=9,452,712 hash=0xfb936c0145c7fceed74dc1339be074b8531343cd06cbd17c0088c62989ef7a93 t=2021-07-30T08:57:36+0000 lvl=info msg="Imported new chain segment" blocks=2 txs=896 mgas=135.918 elapsed=9.991s mgasps=13.603 number=9,542,714 hash=0x7adfb39801cc4589469a7e033232eb3ca7c64c40414964006a06c65a6eb85fe8 age=2d1h5m dirty="4.82 MiB" t=2021-07-30T08:57:47+0000 lvl=info msg="Imported new chain segment" blocks=2 txs=1076 mgas=169.173 elapsed=11.105s mgasps=15.234 number=9,542,716 hash=0x5c4ce24d72a1126fa586a568638c76f931054de212f396b8bc2e1471c5597546 age=2d1h5m dirty="7.42 MiB"
this is logs from my archive node. 2~3 blocks / 12 seconds
my disk is gp3 10000 IOPS 1000 MB/S
I upgraded from gp2, because syncing speed is very slow
I checked disk speed using following commands:
root@ip-172-31-44-89:~# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
and got about 311MB/s while running geth : 16384+0 records in 16384+0 records out 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.45406 s, 311 MB/s
I changed maxpeerCount in config.toml to 200 from 30, but there is no effect.
I updated to latest binary 1.1.1-beta. my hardware CPU 36, RAM 72, GP3 10000 IOPS, 1000 MB/S now block is behind 1 days 23 hours. block generation 2~3 / 10 seconds. what is issue? this is my geth command ./build/bin/geth --config ./config.toml --datadir ./node --gcmode archive --syncmode=full --snapshot=false --http.vhosts=* --cache=18000 --cache.preimages --rpc.allow-unprotected-txs --txlookuplimit 0 console
my experience with a few archive nodes
once cold start running for some time, it stables down at rate of nvme raid0 [3-4 blocks 8 - 12s] <<< catch up very very slowly gp3 raid0 aws gp3 1000MB/s 16000iops [2-3 blocks 9 - 13s] <<< shall not catch up in recent blocksafter 1.1.1-beta, it seems a bit better , i am seeing 5-6 blocks in ~9s, which allows node catching up a bit faster
I am using gp3 aws 1000MB/s, 10000 iops , 1.1.1-beta, but still block generation speed is [2-3 blocks 9 - 13s] <<< very slow
Hi @kgcdream2019, Could you please provide some logs and Disk's mertics data? Maybe we can see some clues from it. In addition, have you tried pruning data? Pruning some data to reduce disk usage may help.
Hi, @j75689 . my node is archive node, so I can't prune some data.
I updated to latest binary 1.1.1-beta. my hardware CPU 36, RAM 72, GP3 10000 IOPS, 1000 MB/S now block is behind 1 days 23 hours. block generation 2~3 / 10 seconds. what is issue? this is my geth command ./build/bin/geth --config ./config.toml --datadir ./node --gcmode archive --syncmode=full --snapshot=false --http.vhosts=* --cache=18000 --cache.preimages --rpc.allow-unprotected-txs --txlookuplimit 0 console
my experience with a few archive nodes
once cold start running for some time, it stables down at rate of nvme raid0 [3-4 blocks 8 - 12s] <<< catch up very very slowly gp3 raid0 aws gp3 1000MB/s 16000iops [2-3 blocks 9 - 13s] <<< shall not catch up in recent blocksafter 1.1.1-beta, it seems a bit better , i am seeing 5-6 blocks in ~9s, which allows node catching up a bit faster
I am using gp3 aws 1000MB/s, 10000 iops , 1.1.1-beta, but still block generation speed is [2-3 blocks 9 - 13s] <<< very slow
5-6 blocks in ~9s <= that improvement is seen consistently on nvme raid0 ,
gp3 may also improve a bit 3-4 blocks in ~9s, but I feel like it will never go to catch up , just not to fall behind a lot more
Anyone tried syncing with i3.x2large aws instance. They have local NVMe stores.
Anyone tried syncing with i3.x2large aws instance. They have local NVMe stores.
It's good , we have multiple full nodes running on it without txlimit pruning
5-6 blocks in ~9s<= that improvement is seen consistently on nvme raid0 ,
How to create nvme raid0? can I upgrade gp3 to nvme raid0 without lose of blockchain data?
Anyone tried syncing with i3.x2large aws instance. They have local NVMe stores.
It's good , we have multiple full nodes running on it without txlimit pruning
That's great to know! Thanks! Do you mind sharing your config??
Anyone tried syncing with i3.x2large aws instance. They have local NVMe stores.
It's good , we have multiple full nodes running on it without txlimit pruning
That's great to know! Thanks! Do you mind sharing your config??
I meant i3en.2xlarge, but i think i3.2xlarge will do too, because I have multiple i3en.xlarge too , they are still in sync (but mind your disk, it won't sustain a few months , because data is ~1.3-1.4T now), just i3en.xlarge would have cpu becoming bottlenect when serving heavy rpc call then will fall behind
i3en.xlarge | 4 | 32 | 1 x 2,500 GB nvme
i3en.2xlarge | 8 | 64 | 2 x 2,500 GB nvme
i3.2xlarge | 8 | 61 | 1 x 1.9tb NVMe SSD
we run with --syncmode=fast --gcmode=full --snapshot=false --txlookuplimit=0 --cache.preimages on i3en.2xlarge for those delayed behind, they can catch up the gap gradually , expect using another 1 min for 1 min delay after p2p "warmed" up
it doesn't matter with v1.1.0-beta/1.1.1-beta,
Prefer go for 1.1.1-beta directly for new setup
Anyone tried syncing with i3.x2large aws instance. They have local NVMe stores.
It's good , we have multiple full nodes running on it without txlimit pruning
That's great to know! Thanks! Do you mind sharing your config??
I meant i3en.2xlarge, but i think i3.2xlarge will do too, because I have multiple i3en.xlarge too , they are still in sync (but mind your disk, it won't sustain a few months , because data is ~1.3-1.4T now), just
i3en.xlargewould have cpu becoming bottlenect when serving heavy rpc call then will fall behindi3en.xlarge | 4 | 32 | 1 x 2,500 GB nvme i3en.2xlarge | 8 | 64 | 2 x 2,500 GB nvme i3.2xlarge | 8 | 61 | 1 x 1.9tb NVMe SSDwe run with
--syncmode=fast --gcmode=full --snapshot=false --txlookuplimit=0 --cache.preimageson i3en.2xlarge for those delayed behind, they can catch up the gap gradually , expect using another 1 min for 1 min delay after p2p "warmed" up it doesn't matter with v1.1.0-beta/1.1.1-beta, Prefer go for1.1.1-betadirectly for new setup
Thanks for the information! I will try it out!
May want to put the snapshots on more or faster servers? Going to take 4 days to download which is nuts to get a node synced :(
Anyone tried syncing with i3.x2large aws instance. They have local NVMe stores.
It's good , we have multiple full nodes running on it without txlimit pruning
That's great to know! Thanks! Do you mind sharing your config??
I meant i3en.2xlarge, but i think i3.2xlarge will do too, because I have multiple i3en.xlarge too , they are still in sync (but mind your disk, it won't sustain a few months , because data is ~1.3-1.4T now), just
i3en.xlargewould have cpu becoming bottlenect when serving heavy rpc call then will fall behindi3en.xlarge | 4 | 32 | 1 x 2,500 GB nvme i3en.2xlarge | 8 | 64 | 2 x 2,500 GB nvme i3.2xlarge | 8 | 61 | 1 x 1.9tb NVMe SSDwe run with
--syncmode=fast --gcmode=full --snapshot=false --txlookuplimit=0 --cache.preimageson i3en.2xlarge for those delayed behind, they can catch up the gap gradually , expect using another 1 min for 1 min delay after p2p "warmed" up it doesn't matter with v1.1.0-beta/1.1.1-beta, Prefer go for1.1.1-betadirectly for new setup
Not same between i3en.2xlarge and i3.2xlarge i3en.2xlarge: Network Speed: Up to 25GB ie.2xlarge: Network Speed: Up to 10GB
The network performance is most important when building all types of Nodes so that ie3n.2xlarge is the best. @jun0tpyrc so your node is working well now, without any issues with v1.1.1-beta?
@kgcdream2019 can you let us when you are synced?
@jayboy-mabushi. Yes, I'll let you know. My archive nodes are still out of sync and the difference in block numbers is getting bigger and bigger over time. Now the block is about 2 days 3 hours later.
did anyone manage to sync? what config parameters did you use?