ethereum / go-ethereum

Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
47.21k stars 19.99k forks source link

What is the upper bound of "imported new state entries"? When will it end? #15616

Closed idotial closed 1 year ago

idotial commented 6 years ago

System information

Geth version: 1.7.2 OS & Version: OSX

Expected behaviour

geth --fast should finish soon.

Actual behaviour

it run for 3days and print “Imported new state entries count=384 elapsed=26.970ms processed=50023987 pending=33074 retry=0 duplicate=19087 unexpected=47765” constantly

Steps to reproduce the behaviour

run geth --fast in console

Backtrace

INFO [12-06|07:08:00] Imported new state entries count=1259 elapsed=12.971ms processed=50014526 pending=34891 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:08:23] Imported new state entries count=774 elapsed=8.950ms processed=50015300 pending=34311 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:08:31] Imported new state entries count=1125 elapsed=9.513ms processed=50016425 pending=33428 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:08:39] Imported new state entries count=1061 elapsed=11.198ms processed=50017486 pending=32566 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:08:49] Imported new state entries count=1314 elapsed=12.041ms processed=50018800 pending=31248 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:09:10] Imported new state entries count=1028 elapsed=10.446ms processed=50019828 pending=30496 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:09:25] Imported new state entries count=1241 elapsed=10.423ms processed=50021069 pending=30088 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:09:37] Imported new state entries count=777 elapsed=6.224ms processed=50021846 pending=29851 retry=26 duplicate=19087 unexpected=47765

nyetwurk commented 4 years ago

Will there ever be an API to get the number of states from a synced geth node to provide a reference?

nyetwurk commented 4 years ago

My statistics:

2019-05-06 01:00:32 avg: 1827 max: 1938 min: 1378 states/s    remain: 136604075 states     4 peers    eta@ 20:46:28.165828
2019-05-06 01:00:37 avg: 1864 max: 1938 min: 1378 states/s    remain: 136595500 states     3 peers    eta@ 20:21:14.951050
2019-05-06 01:00:42 avg: 1791 max: 1938 min: 1378 states/s    remain: 136583359 states     3 peers    eta@ 21:11:16.481006
2019-05-06 01:00:48 avg: 1742 max: 1938 min: 1378 states/s    remain: 136580287 states     3 peers    eta@ 21:46:35.797305
2019-05-06 01:00:53 avg: 1721 max: 1938 min: 1378 states/s    remain: 136575694 states     3 peers    eta@ 22:03:01.154434
2019-05-06 01:00:58 avg: 1682 max: 1938 min: 1378 states/s    remain: 136569043 states     4 peers    eta@ 22:33:15.402442
2019-05-06 01:01:03 avg: 1698 max: 1938 min: 1378 states/s    remain: 136564293 states     3 peers    eta@ 22:20:27.458747

PS. I wrote a tiny python script to overview the process. It's here https://github.com/hayorov/ethereum-sync-mertics

Unfortunately this has a hardcoded reference state count.

nyetwurk commented 4 years ago

Jan 17 2020 Known states: 432391041

nyetwurk commented 4 years ago

https://github.com/ethereum/go-ethereum/issues/16558

1blockologist commented 4 years ago

@nyetwurk thanks! I was wondering, I synced blocks extremely quickly (less than a day) and thought I must have picked the best machine and configuration for the job, but alas, I currently only report 262 million known states, so this will take a while

nyetwurk commented 4 years ago

15 Feb 2020 446266045

INFO [02-15|22:49:59.641] Imported new state entries               count=484  elapsed=11.987ms  processed=446266045 pending=0      retry=0   duplicate=50314 unexpected=640943
chainpioneer commented 4 years ago

23 Feb 2020 449369291 199 GB

INFO [02-23|14:42:57.521] Imported new state entries count=794 elapsed=22.895ms processed=449369291 pending=0 retry=0 duplicate=7272 unexpected=23183

hayorov commented 4 years ago

449369291

NUM_OF_STATES_AS_OF = 455300013 # Actual for Feb, 15 2020

This small script can be helpful if you anticipate about sync process https://github.com/hayorov/ethereum-sync-metrics (written in Python)

# python metrics.py
2019-05-06 01:00:32 avg: 1827 max: 1938 min: 1378 states/s  remain: 136604075 states     4 peers    eta@ 20:46:28.165828
2019-05-06 01:00:37 avg: 1864 max: 1938 min: 1378 states/s  remain: 136595500 states     3 peers    eta@ 20:21:14.951050
2019-05-06 01:00:42 avg: 1791 max: 1938 min: 1378 states/s  remain: 136583359 states     3 peers    eta@ 21:11:16.481006
pluracoin commented 4 years ago

April 09, 2020 475800759 220 GB

INFO [04-09|08:44:12.951] Imported new state entries count=417 elapsed=16.310ms processed=475800759 pending=0 retry=0 duplicate=15060 unexpected=83332

MischaWeerwag commented 4 years ago

April 20, 2020 483782179

hayorov commented 4 years ago

April 20, 2020 updated https://github.com/hayorov/ethereum-sync-metrics

DanielHH commented 4 years ago

Does anyone have the current number of state entries for Ropsten?

jochem-brouwer commented 4 years ago

Updated bound for mainnet:

INFO [05-10|23:51:14.924] Imported new state entries               count=147  elapsed=7.432ms      processed=504700513 pending=0     retry=0   duplicate=1115 unexpected=4208
INFO [05-10|23:51:14.968] Imported new block receipts              count=1    elapsed=37.733ms     number=10040872 hash=27a688…d5f8f4 age=28m12s   size=23.45KiB
INFO [05-10|23:51:14.978] Committed new head block                 number=10040872 hash=27a688…d5f8f4
INFO [05-10|23:51:14.982] Deallocated fast sync bloom              items=504344987 errorrate=0.202
INFO [05-10|23:51:25.223] Imported new chain segment               blocks=3 txs=407 mgas=29.972 elapsed=10.224s      mgasps=2.932 number=10040875 hash=4cb642…c3d687 age=27m45s   dirty=3.67MiB

I.e. 504344987 state entries at 10 May 2020. For fast sync this is about 240GB of data stored on the SSD.

Using a RPi v4, 4GB RAM, externally powered Samsung T5 1TB SSD to sync. Pro tip for Raspberry Pi users: use Ubuntu Server 64bit. Raspbian currently does not natively use 64bit. You can manually "allow" this via some kernel settings but I still ran into out of memory issues. I might have done something wrong there. However, on Ubuntu, I have never had an out of memory error so far since syncing. I have to note that I allocated 8GB swap on the SSD and using --cache=512 as Geth parameter. Also make sure your 30303 port is open, so external nodes can connect (and you can find peers!).

Sadly, I have not written down when I started syncing. However, I know it took less than a week. It is somewhere between 5-6 days I think.

sssubik commented 4 years ago

@jochem-brouwer Hey I am syncing now and is showing:

INFO [05-11|08:18:53.745] Imported new state entries               count=384 elapsed=3.677µs    processed=491362414 pending=99287 retry=0   duplicate=0 unexpected=0
INFO [05-11|08:18:57.107] Initializing fast sync bloom             items=12627357 errorrate=0.000 elapsed=13m52.948s
INFO [05-11|08:19:05.109] Initializing fast sync bloom             items=12711112 errorrate=0.000 elapsed=14m0.950s
INFO [05-11|08:19:13.113] Initializing fast sync bloom             items=12802400 errorrate=0.000 elapsed=14m8.954s

with processed 491362414. Does this mean I am in the end of the process or its still has other processes left? Also right now my RAM usage is only 8GB whereas my capacity is 30GB. And my CPU usage is also prettly low. Is there a way to increase the performance?

jochem-brouwer commented 4 years ago

@sssubik Yes you are almost there! About 13 million states.

The RAM is fine. My node was using about 2GB most of the time.

I dont know how to increase performance though.

sssubik commented 4 years ago
NFO [05-13|13:17:39.185] Imported new block headers               count=1    elapsed=7.321ms      number=10057490 hash=c3dce2…dc2732
INFO [05-13|13:17:39.443] Imported new block headers               count=1    elapsed=6.425ms      number=10057491 hash=1d75f2…cf1b86
INFO [05-13|13:17:46.280] Imported new state entries               count=0    elapsed=16.717µs     processed=492850530 pending=255    retry=2   duplicate=2655 unexpected=32505
INFO [05-13|13:17:46.280] Imported new state entries               count=0    elapsed=31.72µs      processed=492850530 pending=250    retry=0   duplicate=2656 unexpected=32505
INFO [05-13|13:17:46.886] Imported new state entries               count=0    elapsed=94.498µs     processed=492850530 pending=250    retry=229 duplicate=2657 unexpected=32506

Hey @jochem-brouwer I am still in processed=492850530 state. Its already been 2 days and its pace is very low. The block headers that is being imported is actually the current block thats being mined. Is this normal to take this long for the state trie to get downloaded? I am having very little progress

jochem-brouwer commented 4 years ago

Hey @sssubik, you are very close to getting synced. However it seems like your node isn't really importing new state entries. Did you try the classic "turn it off and on again"? (I.e. kill your node and restart it). Do you have port 30303 open as well (for peer discovery)?

kot-begemot commented 4 years ago

@jochem-brouwer how close? I am in similar situation as sssubik. Am I couple of days close or couple of hours? is there is a way to even approximate that somehow?

BlinkyStitt commented 4 years ago

May 18, 2020 knownStates = 581,839,369

mstrokin commented 4 years ago

You need SSD disks to run geth, it will never sync to 100% and even if it does it will lag behind after some time

On Thu, 25 Jun 2020 at 12:07, AdminAnticaptcha notifications@github.com wrote:

I'm doing an experiment with "fast" sync with a server rented in Hetzner. 4 10TB disks in RAID10. 21 days from the beginning and my current stats are: { currentBlock: 10333881, highestBlock: 10333971, knownStates: 530115529, pulledStates: 530103862, startingBlock: 10301219 } Close to WyseNynja's 581mln, but it still has very slow progress.

I think such huge "fast sync" times could be easily avoided if Ethereum project simply posted the chainstate archive every month or so. Otherwise everyone should wait for at least a month to get it synced.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ethereum/go-ethereum/issues/15616#issuecomment-649407072, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEJ2SDN46NY44QBNQQQL6TRYMHURANCNFSM4EG7I5CQ .

yosoyubik commented 4 years ago

Hi, I was wondering if anyone has succeeded recently at syncing on a rpi4. I followed the tutorial here but after three weeks it seems to be stuck at downloading state entries. I've also tried restarting, rebooting the rpi..

These are my logs:

Imported new state entries count=437  elapsed=5.679ms processed=616671456 pending=3538  retry=0    duplicate=9385 unexpected=58338
Imported new state entries count=608  elapsed=9.139ms processed=616672064 pending=3419  retry=0    duplicate=9385 unexpected=58338
Imported new block headers count=2    elapsed=25.017ms number=10390929 hash="0bf3e0…99c55e" age=1m3s
Imported new state entries count=552  elapsed=11.419ms processed=616672616 pending=3195  retry=0    duplicate=9385 unexpected=58338
Imported new state entries count=353  elapsed=4.867ms processed=616672969 pending=3169  retry=0    duplicate=9385 unexpected=58338
> eth.syncing
{
  currentBlock: 10390879,
  highestBlock: 10390954,
  knownStates: 616693498,
  pulledStates: 616690561,
  startingBlock: 10364969
}

> eth.syncing.highestBlock - eth.syncing.currentBlock
77
> eth.syncing.knownStates - eth.syncing.pulledStates
7911
> eth.syncing.currentBlock * 100 / eth.syncing.highestBlock
99.99924933320578
kryptoklob commented 4 years ago

Checking in, fast sync just finished up at 545 million states. Which is very odd given that @WyseNynja pulled 581 million states. Is it normal for 41 million states to have been deleted since May 18?

yosoyubik commented 4 years ago

Checking in, fast sync just finished up at 545 million states.

That's... a bit more than the 616693498 I can see in my case. Maybe I need to start syncing again from scratch...

drhashes commented 4 years ago

557918041 states

HaffASE commented 4 years ago

processed=598602988 pending=0

gr8den commented 4 years ago

What are states now? My current pulledStates is 634149016

gr8den commented 4 years ago

Done syncing at 663339026 states. Size on disk: 328G

chainpioneer commented 3 years ago

block 10936777 states 593892151 size 265G

Incrediblez7 commented 3 years ago

processed=767339105 and still increasing. Block=10980245 2020/10/3

Any idea of the current state count? A website with state count would be super useful.

Incrediblez7 commented 3 years ago

Finally synced. processed=785813881 Block=10980323

ghost commented 3 years ago

Yikes! Scalability on ETH2.0 needed ASAP.

Gave up on blockchain. Run all my Solidity smart contracts on Hedera hashgraph now.

SirLancelot-OG commented 3 years ago

Took me just over 9 days to full sync on a Pi. No sweat!

BlinkyStitt commented 3 years ago

Why do some of the nodes have 785M entries, but others have 603M?

My node just completed with 603101157, but just 5 days ago @Incrediblez7 had 785813881. I restarted my node just a couple minutes into the sync to change some config, but that wouldn't explain such a large difference, would it?

I started my sync at Oct 5 10:57 AM and it ended at Oct 6 12:28 PM (1 day 1 hour 31 minutes)

INFO [10-06|12:27:36.623] Imported new state entries               count=2053 elapsed=31.145ms    processed=603101100 pending=135    trieretry=0   coderetry=0   duplicate=69447 unexpected=264947   
INFO [10-06|12:27:36.652] Imported new state entries               count=57   elapsed=1.330ms     processed=603101157 pending=0      trieretry=0   coderetry=0   duplicate=69447 unexpected=264947          
INFO [10-06|12:27:36.655] Imported new block receipts              count=1    elapsed=1.692ms     number=11003934 hash="f9cdf7…743976" age=25m28s     size=82.56KiB                                  
INFO [10-06|12:27:36.658] Committed new head block                 number=11003934 hash="f9cdf7…743976"                                                                                                     
INFO [10-06|12:27:36.722] Deallocated fast sync bloom              items=602129406 errorrate=0.000                                                                                                          
INFO [10-06|12:27:45.152] Imported new chain segment               blocks=26 txs=3848 mgas=311.621 elapsed=8.427s      mgasps=36.978 number=11003960 hash="57e63b…9ad207" age=20m52s     dirty=0.00B        
INFO [10-06|12:27:53.158] Imported new chain segment               blocks=39 txs=7742 mgas=483.612 elapsed=8.006s      mgasps=60.406 number=11003999 hash="710994…399ecb" age=12m22s     dirty=0.00B        
INFO [10-06|12:27:59.388] Imported new chain segment               blocks=40 txs=6121 mgas=472.947 elapsed=6.230s      mgasps=75.913 number=11004039 hash="2d6e9b…4bbd95" dirty=0.00B                       
INFO [10-06|12:27:59.388] Imported new block headers               count=1    elapsed=20.143s     number=11004040 hash="e74b91…cd9d46"                                                                      
INFO [10-06|12:27:59.389] Upgrading chain index                    type=bloombits                                percentage=43                                                                              
INFO [10-06|12:27:59.392] Imported new block headers               count=1    elapsed=3.861ms     number=11004041 hash="2f7438…47fa95"                                                            
INFO [10-06|12:27:59.396] Imported new block headers               count=2    elapsed=3.927ms     number=11004043 hash="bf32fa…b0ddc3"                                                                      
INFO [10-06|12:27:59.542] Imported new block headers               count=1    elapsed=7.050ms     number=11004044 hash="e80916…cce2a8"                                                                      
INFO [10-06|12:27:59.782] Imported new chain segment               blocks=1  txs=155  mgas=12.477  elapsed=169.439ms   mgasps=73.638 number=11004040 hash="e74b91…cd9d46" dirty=0.00B                       
INFO [10-06|12:28:00.253] Imported new chain segment               blocks=3  txs=641  mgas=37.294  elapsed=469.657ms   mgasps=79.406 number=11004043 hash="bf32fa…b0ddc3" dirty=0.00B
INFO [10-06|12:28:00.363] Imported new chain segment               blocks=1  txs=157  mgas=12.281  elapsed=109.632ms   mgasps=112.022 number=11004044 hash="e80916…cce2a8" dirty=0.00B
INFO [10-06|12:28:00.363] Fast sync complete, auto disabling 

Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz 970 EVO NVMe M.2 SSD 1TB 32GB of RAM and --cache set to 8GB

holiman commented 3 years ago

Why do some of the nodes have 785M entries, but others have 603M?

https://github.com/ethereum/go-ethereum/issues/14647#issuecomment-682098181:

Every time you restart, geth goes into a mode where, while importing state, also reads the entire db to create a bloom filter of existing states. Which slows down sync. Also, every time you restart, you then choose a new pivot point to sync to, so more state to download.

Also, if you have slow progress, this will get worse. Every ~128 blocks, the peer(s) we're syncing against "forget" about the state (due to pruning). And so we need to move the pivot point. Which means that some of the stuff you already downloaded is discarded, and some new stuff needs to be fetched. So if the progress is too slow, it will have to download a lot more data than if the progress is fast: essentially as you are syncing, the data becomes stale.

BlinkyStitt commented 3 years ago

Thanks. I think @Incrediblez7 must have much slower hardware than me if they ended up with 180M extra states.

Incrediblez7 commented 3 years ago

Thanks. I think @Incrediblez7 must have much slower hardware than me if they ended up with 180M extra states.

Hmm... I'm running geth on Vultr with 64GB RAM and 16 CPU Cores so the hardware shouldn't be an issue. Probably because of the internet issue and the peers I'm connected to.

BlinkyStitt commented 3 years ago

Your storage matters more than your CPU or memory. What storage do you have? HDD, SSD, or NVME? How many IOPS?

On Oct 28, 2020, at 1:48 AM, Incrediblez7 notifications@github.com wrote:

 Thanks. I think @Incrediblez7 must have much slower hardware than me if they ended up with 180M extra states.

Hmm... I'm running geth on Vultr with 64GB RAM and 16 CPU Cores so the hardware shouldn't be an issue. Probably because of the internet issue and the peers I'm connected to.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Incrediblez7 commented 3 years ago

1280GB SSD with 10k+ IOPS on Vultr. Corrections: I recently upgraded to 1600GB SSD with 24 CPU Cores and 96GB RAM.

AndreiD commented 3 years ago

no point 24 core and 1 million ram. really. all should get the "samsung 980 pro 1tb". that's the only way

Incrediblez7 commented 3 years ago

Since I'm located in China and I couldn't get a decent amount of peers, I'm running Geth on a VPS, so I can't change the NVME myself. But isn't ~15k IOPS enough? Or more disk performance is required?

gomes7997 commented 3 years ago

I have a NanoPC T4 with 1TB NVMe SSD which has been syncing for about 6 weeks. I'm running the EthArmbian build available here: https://github.com/diglos/userpatches

I noticed a reply above in which @SirLancelot-OG was able to sync a Raspberry Pi in only about 9 days. Given that this is similar hardware, I'm wondering if anyone can help me troubleshoot my setup. My node has managed to process 773755887 states in 6 weeks:

Nov 01 21:34:40 ethnode-bc89073e geth[16112]: INFO [11-01|21:34:40.721] Downloader queue stats receiptTasks=0 blockTasks=0 itemSize=187.24KiB throttle=351 Nov 01 21:34:42 ethnode-bc89073e geth[16112]: INFO [11-01|21:34:42.779] Imported new block headers count=1 elapsed=34.322ms number=11173619 hash="67cad5…f81212" Nov 01 21:34:45 ethnode-bc89073e geth[16112]: INFO [11-01|21:34:45.971] Imported new state entries count=384 elapsed="15.75µs" processed=773754623 pending=193816 trieretry=0 coderetry=0 duplicate=0 unexpected=393 Nov 01 21:35:00 ethnode-bc89073e geth[16112]: INFO [11-01|21:35:00.800] Imported new state entries count=384 elapsed="15.167µs" processed=773755007 pending=194380 trieretry=0 coderetry=0 duplicate=0 unexpected=393 Nov 01 21:35:05 ethnode-bc89073e geth[16112]: INFO [11-01|21:35:05.286] Imported new block headers count=1 elapsed=446.894ms number=11173620 hash="885043…71fd63" Nov 01 21:35:17 ethnode-bc89073e geth[16112]: INFO [11-01|21:35:17.935] Imported new block headers count=1 elapsed=419.383ms number=11173621 hash="4da9b0…851a0f" Nov 01 21:35:20 ethnode-bc89073e geth[16112]: INFO [11-01|21:35:20.856] Imported new state entries count=496 elapsed="694.163µs" processed=773755503 pending=195065 trieretry=1 coderetry=0 duplicate=0 unexpected=393 Nov 01 21:35:30 ethnode-bc89073e geth[16112]: INFO [11-01|21:35:30.835] Imported new block headers count=1 elapsed=554.866ms number=11173622 hash="a85c36…87c3b3" Nov 01 21:35:33 ethnode-bc89073e geth[16112]: INFO [11-01|21:35:33.590] Imported new block headers count=2 elapsed=39.649ms number=11173624 hash="0e4464…0ca9ed" Nov 01 21:35:36 ethnode-bc89073e geth[16112]: INFO [11-01|21:35:36.124] Imported new state entries count=384 elapsed=3.030ms processed=773755887 pending=195608 trieretry=0 coderetry=0 duplicate=0 unexpected=393

Is there a way to determine whether my sync is slow because of disk or network IO? I have run iostats on the device during sync and get the following for SSD throughput (nvme0n1):

avg-cpu: %user %nice %system %iowait %steal %idle 14.34 0.00 11.51 7.27 0.00 66.87

Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn nvme0n1 2927.80 32683.20 342.40 163416 1712 mmcblk1 0.00 0.00 0.00 0 0 mmcblk1rpmb 0.00 0.00 0.00 0 0 mmcblk1boot1 0.00 0.00 0.00 0 0 mmcblk1boot0 0.00 0.00 0.00 0 0 mmcblk0 65.80 1172.00 2.40 5860 12 zram0 0.00 0.00 0.00 0 0 zram1 318.60 1273.60 0.80 6368 4

I have run most of the sync without port forwarding enabled, but one week ago I enabled port forwarding to the device for UDP & TCP port 30303.

Can anyone suggest monitoring or other tests I can perform to understand where the bottleneck is?

Duncan-Brain commented 3 years ago

Can anyone suggest monitoring or other tests I can perform to understand where the bottleneck is?

I'll second that. I am also finding it hard to tell if there is an issue syncing without knowing whether I am catching up or falling behind. And a generic what to do about it.

Xavier59 commented 3 years ago

It took me approximately 36 hours to sync. Here is the current state :

 INFO [11-02|05:35:50.478] Imported new block receipts              count=1    elapsed=4.983ms    number=11175392 hash="d37205…f8de8a" age=24m44s   size=87.40KiB
INFO [11-02|05:35:50.492] Committed new head block                 number=11175392 hash="d37205…f8de8a"
INFO [11-02|05:35:50.562] Deallocated fast sync bloom              items=619579733 errorrate=0.001

970 EVO NVMe M.2 SSD 1TB AMD Ryzen 7 1700 (3.0 GHz) DDR4 Corsair Vengeance LPX, Noir, 4 x 8 Go, 3200 MHz, CAS 16

Good luck !

Neurone commented 3 years ago

Sharing data of my fully synced node also, maybe it is useful to others.

D:\Program Files\Geth>geth --datadir s:\Ethereum inspect
INFO [11-11|19:19:15.793] Maximum peer count                       ETH=50 LES=0 total=50
INFO [11-11|19:19:16.156] Set global gas cap                       cap=25000000
INFO [11-11|19:19:16.160] Allocated cache and file handles         database=s:\Ethereum\geth\chaindata cache=512.00MiB handles=8192
INFO [11-11|19:19:27.022] Opened ancient database                  database=s:\Ethereum\geth\chaindata\ancient
INFO [11-11|19:19:27.046] Disk storage enabled for ethash caches   dir=s:\Ethereum\geth\ethash count=3
INFO [11-11|19:19:27.051] Disk storage enabled for ethash DAGs     dir=C:\Users\giuse\AppData\Local\Ethash count=2
INFO [11-11|19:19:27.059] Loaded most recent local header          number=11237906 hash="d8c4b8…c3f1e9" td=18641055599883751407245 age=53s
INFO [11-11|19:19:27.069] Loaded most recent local full block      number=11237906 hash="d8c4b8…c3f1e9" td=18641055599883751407245 age=53s
INFO [11-11|19:19:27.079] Loaded most recent local fast block      number=11237906 hash="d8c4b8…c3f1e9" td=18641055599883751407245 age=53s
INFO [11-11|19:19:27.087] Loaded last fast-sync pivot marker       number=10760885
INFO [11-11|19:19:35.100] Inspecting database                      count=4996000 elapsed=8.002s
INFO [11-11|19:19:43.108] Inspecting database                      count=10062000 elapsed=16.010s
INFO [11-11|19:19:51.115] Inspecting database                      count=14730000 elapsed=24.017s
INFO [11-11|19:19:59.123] Inspecting database                      count=19415000 elapsed=32.025s
...
INFO [11-11|19:50:45.078] Inspecting database                      count=1815272000 elapsed=31m17.980s
INFO [11-11|19:50:53.083] Inspecting database                      count=1821919000 elapsed=31m25.985s
INFO [11-11|19:51:01.090] Inspecting database                      count=1828550000 elapsed=31m33.992s
INFO [11-11|19:51:09.097] Inspecting database                      count=1835247000 elapsed=31m41.999s
+-----------------+--------------------+------------+-----------+
|    DATABASE     |      CATEGORY      |    SIZE    |   ITEMS   |
+-----------------+--------------------+------------+-----------+
| Key-Value store | Headers            | 54.97 MiB  |    100438 |
| Key-Value store | Bodies             | 3.52 GiB   |     98390 |
| Key-Value store | Receipt lists      | 4.48 GiB   |     98390 |
| Key-Value store | Difficulties       | 7.11 MiB   |    113813 |
| Key-Value store | Block number->hash | 6.04 MiB   |    113813 |
| Key-Value store | Block hash->number | 439.41 MiB |  11237928 |
| Key-Value store | Transaction index  | 30.13 GiB  | 898783141 |
| Key-Value store | Bloombit index     | 1.76 GiB   |   5617664 |
| Key-Value store | Contract codes     | 264.01 MiB |     44710 |
| Key-Value store | Trie nodes         | 130.27 GiB | 880287080 |
| Key-Value store | Trie preimages     | 2.98 GiB   |  45170757 |
| Key-Value store | Account snapshot   | 0.00 B     |         0 |
| Key-Value store | Storage snapshot   | 0.00 B     |         0 |
| Key-Value store | Clique snapshots   | 0.00 B     |         0 |
| Key-Value store | Singleton metadata | 151.00 B   |         5 |
| Ancient store   | Headers            | 4.75 GiB   |  11147907 |
| Ancient store   | Bodies             | 108.13 GiB |  11147907 |
| Ancient store   | Receipt lists      | 50.63 GiB  |  11147907 |
| Ancient store   | Difficulties       | 173.74 MiB |  11147907 |
| Ancient store   | Block number->hash | 404.00 MiB |  11147907 |
| Light client    | CHT trie nodes     | 0.00 B     |         0 |
| Light client    | Bloom trie nodes   | 0.00 B     |         0 |
+-----------------+--------------------+------------+-----------+
|                         TOTAL        | 337.97 GIB |           |
+-----------------+--------------------+------------+-----------+
ERROR[11-11|19:51:16.769] Database contains unaccounted data       size=126.40KiB count=2748
peterkvasnica commented 3 years ago

I'm trying to do a fastsync on a local server but it seems the disk speed drops off after about 30 minutes of "importing new state entry". I'm running the sync process on machine with SSD, 16GB RAM and i5. Cache is setup to 12GB (fills up only to 50%).

The process starts with about 100-150MB/s I/O and after 30 minutes drops to 10-20MB/s I/O.

Is this normal? What are the average disk speeds on the import states task?

image

gregnuj commented 3 years ago

I just finished syncing a new node the final count was processed=644366474

LucasBruder commented 3 years ago

just hit processed=648537261 using around 300GB

MikeJerred commented 3 years ago

Finished syncing last night, final was: knownStates: 640595237.

Hardware: Samsung 970 EVO Plus 1TB NVMe SSD 32 GB DDR4 3200MHz RAM - cachesize of 16GB for geth i7-9700K CPU @ 3.6GHz

AndreiD commented 3 years ago

it would help if you write your hardware too not just the number...

Neurone commented 3 years ago

I just synced another eth1 full node in 64 hours, processing 650.634.632 state entries, using 282.75 GIB. Full stats below.

Please note that during synchronization the same machine was running a Teku beacon node, so performance could have been better without it. I wanted to test if those two clients can both run smoothly on this mini PC and, spoiler alert, yes they can 😉.

KEY VALUE
Fast sync complete 64 hours
Processed state entries 650.634.632
Storage used 282.75 GIB
OS Ubuntu 20.04.1
Client Geth/v1.9.24-stable-cc05b050/linux-amd64/go1.15.5
Machine MINISFORUM DeskMini UM300 Mini PC
Processor AMD Ryzen™ 3 3300U , 4 Cores/4 Threads
Memory DDR4 8GB Dual channel (min. 1 GB reserved for graphic card, so actual RAM 7GB!)
Storage n.1 Kingston M.2 2280 256GB SATA SSD (used by Teku)
Storage n.2 Crucial BX500 1TB SATA SSD (used by Geth)
Connectivity Ethernet 1Gb
ISP Fastweb, Italy
./geth
INFO [12-02|03:57:17.926] Starting Geth on Ethereum mainnet...
INFO [12-02|03:57:17.927] Bumping default cache on mainnet         provided=1024 updated=4096
WARN [12-02|03:57:17.927] Sanitizing cache to Go's GC limits       provided=4096 updated=2323
INFO [12-02|03:57:17.934] Maximum peer count                       ETH=50 LES=0 total=50
INFO [12-02|03:57:17.934] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [12-02|03:57:17.936] Set global gas cap                       cap=25000000
INFO [12-02|03:57:17.936] Allocated trie memory caches             clean=580.00MiB dirty=580.00MiB
...
INFO [12-02|03:57:18.015] Writing default main-net genesis block
INFO [12-02|03:57:18.279] Persisted trie from memory database      nodes=12356 size=1.78MiB time=84.346878ms gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [12-02|03:57:18.279] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000 Petersburg: 7280000 Istanbul: 9069000, Muir Glacier: 9200000, YOLO v2: <nil>, Engine: ethash}"
...
INFO [12-02|03:57:18.280] Initialising Ethereum protocol           versions="[65 64 63]" network=1 dbversion=<nil>
WARN [12-02|03:57:18.280] Upgrade blockchain database version      from=<nil> to=8
INFO [12-02|03:57:18.281] Loaded most recent local header          number=0 hash="d4e567…cb8fa3" td=17179869184 age=51y7mo4w
INFO [12-02|03:57:18.281] Loaded most recent local full block      number=0 hash="d4e567…cb8fa3" td=17179869184 age=51y7mo4w
INFO [12-02|03:57:18.281] Loaded most recent local fast block      number=0 hash="d4e567…cb8fa3" td=17179869184 age=51y7mo4w
INFO [12-02|03:57:18.281] Regenerated local transaction journal    transactions=0 accounts=0
INFO [12-02|03:57:18.298] Allocated fast sync bloom                size=1.13GiB
INFO [12-02|03:57:18.304] Starting peer-to-peer node               instance=Geth/v1.9.24-stable-cc05b050/linux-amd64/go1.15.5
...
INFO [12-02|03:57:18.667] Initialized fast sync bloom              items=12356 errorrate=0.000 elapsed=367.872ms
...
INFO [12-02|03:57:28.334] Block synchronisation started
...
INFO [12-02|03:57:35.319] Imported new state entries               count=1152 elapsed=5.229ms     processed=45201 pending=20345 trieretry=0 coderetry=0 duplicate=0 unexpected=0
INFO [12-02|03:57:35.425] Imported new state entries               count=1152 elapsed=4.800ms     processed=46353 pending=20673 trieretry=0 coderetry=0 duplicate=0 unexpected=0
INFO [12-02|03:57:35.751] Imported new state entries               count=1536 elapsed=8.549ms     processed=47889 pending=19409 trieretry=0 coderetry=0 duplicate=0 unexpected=0
...
INFO [12-04|20:52:06.008] Imported new state entries               count=1996 elapsed=62.015ms    processed=650631754 pending=9510   trieretry=0    coderetry=0 duplicate=126032 unexpected=765459
INFO [12-04|20:52:06.239] Imported new state entries               count=2191 elapsed=141.737ms   processed=650633945 pending=2499   trieretry=0    coderetry=0 duplicate=126032 unexpected=765459
INFO [12-04|20:52:10.981] Imported new state entries               count=687  elapsed=45.228ms    processed=650634632 pending=0      trieretry=0    coderetry=0 duplicate=126032 unexpected=765459
INFO [12-04|20:52:10.998] Committed new head block                 number=11388325 hash="4dfe95…2574b4"
INFO [12-04|20:52:11.049] Deallocated fast sync bloom              items=646967270 errorrate=0.006
...
INFO [12-04|20:52:11.049] Deallocated fast sync bloom              items=646967270 errorrate=0.006
...
INFO [12-04|20:58:18.180] Fast sync complete, auto disabling
./geth inspect
INFO [12-04|22:37:47.671] Maximum peer count                       ETH=50 LES=0 total=50
INFO [12-04|22:37:47.671] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [12-04|22:37:47.672] Set global gas cap                       cap=25000000
...
INFO [12-04|22:37:52.507] Loaded most recent local header          number=11388879 hash="0ec041…573550" td=19169271088158317937607 age=3m28s
INFO [12-04|22:37:52.507] Loaded most recent local full block      number=11388879 hash="0ec041…573550" td=19169271088158317937607 age=3m28s
INFO [12-04|22:37:52.507] Loaded most recent local fast block      number=11388879 hash="0ec041…573550" td=19169271088158317937607 age=3m28s
INFO [12-04|22:37:52.510] Loaded last fast-sync pivot marker       number=11388325
INFO [12-04|22:38:00.533] Inspecting database                      count=10557000 elapsed=8.000s
INFO [12-04|22:38:08.533] Inspecting database                      count=21006000 elapsed=16.000s
INFO [12-04|22:38:16.533] Inspecting database                      count=31660000 elapsed=24.000s
...
INFO [12-04|22:52:30.881] Inspecting database                      count=1561224000 elapsed=14m38.348s
INFO [12-04|22:52:38.881] Inspecting database                      count=1573276000 elapsed=14m46.348s
INFO [12-04|22:52:46.881] Inspecting database                      count=1581359000 elapsed=14m54.348s
+-----------------+--------------------+------------+-----------+
|    DATABASE     |      CATEGORY      |    SIZE    |   ITEMS   |
+-----------------+--------------------+------------+-----------+
| Key-Value store | Headers            | 49.31 MiB  |     90033 |
| Key-Value store | Bodies             | 3.28 GiB   |     90033 |
| Key-Value store | Receipt lists      | 4.08 GiB   |     90033 |
| Key-Value store | Difficulties       | 5.66 MiB   |     99853 |
| Key-Value store | Block number->hash | 4.68 MiB   |     99771 |
| Key-Value store | Block hash->number | 445.31 MiB |  11388911 |
| Key-Value store | Transaction index  | 31.01 GiB  | 924916880 |
| Key-Value store | Bloombit index     | 1.80 GiB   |   5693440 |
| Key-Value store | Contract codes     | 1.59 GiB   |    333905 |
| Key-Value store | Trie nodes         | 71.08 GiB  | 647171117 |
| Key-Value store | Trie preimages     | 8.82 MiB   |    132275 |
| Key-Value store | Account snapshot   | 0.00 B     |         0 |
| Key-Value store | Storage snapshot   | 0.00 B     |         0 |
| Key-Value store | Clique snapshots   | 0.00 B     |         0 |
| Key-Value store | Singleton metadata | 151.00 B   |         5 |
| Ancient store   | Headers            | 4.83 GiB   |  11298879 |
| Ancient store   | Bodies             | 111.38 GiB |  11298879 |
| Ancient store   | Receipt lists      | 52.63 GiB  |  11298879 |
| Ancient store   | Difficulties       | 176.19 MiB |  11298879 |
| Ancient store   | Block number->hash | 409.47 MiB |  11298879 |
| Light client    | CHT trie nodes     | 0.00 B     |         0 |
| Light client    | Bloom trie nodes   | 0.00 B     |         0 |
+-----------------+--------------------+------------+-----------+
|                         TOTAL        | 282.75 GIB |           |
+-----------------+--------------------+------------+-----------+
ERROR[12-04|22:52:52.717] Database contains unaccounted data       size=128.10KiB count=2785