bnb-chain / bsc

A BNB Smart Chain client based on the go-ethereum fork
GNU Lesser General Public License v3.0
2.63k stars 1.52k forks source link

Global critical problem. Slow sync! #545

Closed TehnobitSystems closed 1 year ago

TehnobitSystems commented 2 years ago

Hi everyone! Full BSC node cannot fully sync. Never. The same problem is affecting many guys here. Many posts have already been created on github and other sources, but there is no solution can be find anywhere. Many recommendations do not help solve the problem. This is already a global problem, but the developers are not responding. How to get a reaction from the BSC engineering team? If you know someone from the BSC team or other guys who can help, let's mention the engineers here so that they would see this.

ib0b commented 2 years ago

The important value is the DSK read 29744 -- when I was syncing on mine , I got 30-40K, but this should be still plenty Your peers should be more, you can try checking that port 30311 is open on your hosting service... though I am not 100% sure if this is necessary, Also try increasing maxpeers to a higher limit

chevoisiatesalvati commented 2 years ago

The important value is the DSK read 29744 -- when I was syncing on mine , I got 30-40K, but this should be still plenty Your peers should be more, you can try checking that port 30311 is open on your hosting service... though I am not 100% sure if this is necessary, Also try increasing maxpeers to a higher limit

Do you suggest to restart the node with more maxpeers? I don't know if it's going to change something, but I can try. The thing I don't understand is how is possible that with 2 nvme gen 4 in RAID0 I'm seeing that they're busy at 95-99% with this low values in read. I'm actually around 20-25k in read and sometimes it goes higher and sometimes lower. But the fact is that with this hardware it shouldn't be so "busy" with these values, right?

chevoisiatesalvati commented 2 years ago

I restarted with maxpeers 250, now I got 82 peers but I'm slower than the actual chain lol. In 5 minutes of running I lost 1 minute instead of gaining it ahaha I'm desperate!

Anyway I was wondering..could be that I'm having this performance due to the fact that I'm running it on a Virtual machine? Anyone is running the node on a VM? And how could I improve the performance on that? Cause I can't run Linux on the main hardware since I use it with Windows to do other stuff

ib0b commented 2 years ago

The important value is the DSK read 29744 -- when I was syncing on mine , I got 30-40K, but this should be still plenty Your peers should be more, you can try checking that port 30311 is open on your hosting service... though I am not 100% sure if this is necessary, Also try increasing maxpeers to a higher limit

Do you suggest to restart the node with more maxpeers? I don't know if it's going to change something, but I can try. The thing I don't understand is how is possible that with 2 nvme gen 4 in RAID0 I'm seeing that they're busy at 95-99% with this low values in read. I'm actually around 20-25k in read and sometimes it goes higher and sometimes lower. But the fact is that with this hardware it shouldn't be so "busy" with these values, right?

At this point I am not entirely sure what would be causing the slow sync, sorry

chevoisiatesalvati commented 2 years ago

From when I restarted the node, I'm not going any forward....stuck at 2d11h27m. Same settings as before and same peers. Can't believe it

caiiiyua commented 2 years ago

I am using snapshot from 16 Nov and got the full node synced around 24 hours including the snapshot downloads. image

It takes about 1T after full sync. nohup geth --config ./config.toml --datadir ./data-seed --cache 36000 --rpc.allow-unprotected-txs --txlookuplimit 0 &

peerCount consists of 100 as configured.

mgasps is around 100+ but depends on txns in the block.

elapsed time is around 500ms for a block with 500 txns.

Will see how it goes and see whether elapsed time could be optimized further.

chevoisiatesalvati commented 2 years ago

image

This is mine. LOL What hardware are you using? Also are you on VM or physical machine? And if you're on VM, what's your settings?

Also I'm noticing that the size of my chaindata folder is growing really too fast (I think the ancient folder is growing a lot). Started from snapshot of 16/11 (that was around 700 GB, right?), and I'm already at 1.3 TB and still +2 days behind. I don't think that I'm going able to sync with this amount of space since I only have 1.8 TB of space in total (2 ssd WD black SN850 of 1 TB in RAID0) What's your total size of the chaindata folder when you're sync? Do you have ancient folder inside chaindata?

duoxehyon commented 2 years ago

I've been syncing for a week by now and still it is importing state entries.

Capture

my hardware:

16 vcpu 64 gb ram 2.3 tb nvme 15000 iops 400 mbps read / write speed

why is it taking forever? please can someone help.

forcodedancing commented 2 years ago

@NeoMitashi Hello, can you try the suggestions in #338 #502 to see whether it helps or not?

noXi89 commented 2 years ago

We gave up on BSC after 2'600'000'000 synced states. If someone needs a number.

alex-vg commented 1 year ago

so this is fixed? @bnb-tw