0

I start geth in the following way:

geth --history.state=0 --history.transactions=0 --gcmode archive --syncmode=full --cache=4096 --state.scheme=hash --mainnet --authrpc.addr localhost --authrpc.port 8551 --authrpc.vhosts localhost --authrpc.jwtsecret /tmp/jwtsecret

My goal is to be able to trace any historical transaction i.e. calling debug.traceTransaction.

The issue i'm having is that it will take months for geth to sync cuz importing is very slow:

INFO [08-15|15:10:49.402] Imported new chain segment               number=4,288,189  hash=75d32a..8521e9 blocks=101 txs=12360 mgas=563.844  elapsed=8.016s    mgasps=70.332  age=7y2d20h snapdiffs=5.10MiB triedirty=0.00B
INFO [08-15|15:10:53.605] Forkchoice requested sync to new head    number=20,534,241 hash=6f00c4..c0e721 finalized=20,534,177
INFO [08-15|15:10:57.460] Imported new chain segment               number=4,288,294  hash=95378c..9daadf blocks=105 txs=13791 mgas=618.156  elapsed=8.057s    mgasps=76.713  age=7y2d19h snapdiffs=2.50MiB triedirty=0.00B
INFO [08-15|15:11:00.808] Forkchoice requested sync to new head    number=20,534,242 hash=6adfd3..73f712 finalized=20,534,177
INFO [08-15|15:11:05.509] Imported new chain segment               number=4,288,435  hash=7598fa..98ca42 blocks=141 txs=15239 mgas=790.501  elapsed=8.048s    mgasps=98.215  age=7y2d18h snapdiffs=4.29MiB triedirty=0.00B
INFO [08-15|15:11:13.017] Forkchoice requested sync to new head    number=20,534,243 hash=962a9a..18f234 finalized=20,534,177
INFO [08-15|15:11:13.572] Imported new chain segment               number=4,288,480  hash=2a3add..95ff4f blocks=45  txs=5422  mgas=258.834  elapsed=8.063s    mgasps=32.100  age=7y2d17h snapdiffs=4.89MiB triedirty=0.00B
INFO [08-15|15:11:21.612] Imported new chain segment               number=4,288,587  hash=936cbd..19c468 blocks=107 txs=12321 mgas=610.739  elapsed=8.039s    mgasps=75.966

So what i see is that it downloads 100+ blocks every like 8 seconds which is slow(12 blocks per sec). It would take like 44 hours at least(but proly even more cuz starting blocks are smaller in terms of transaction count) to download 20 millions of blocks. The download speed is around 500 Kb/sec.

The setup i'm using is 10 ssd NVMe disk in a raid in total of 16tb of capacity+, 10Gigabit/sec network, 256gb of ddr5 memory and Xeon Silver 4410Y processor with 48 cores.

I'm wondering if i'm using wrong geth options? Can i tune something so it downloads more blocks. Is there like a standard set of options to make archive/tracing geth node? Please , help.

1 Answer 1

0

Not an expert but I once ran a node myself so based on that experience I can recommend a few tips:

  1. Snapshot generation can slow down the sync process. You can try disabling snapshots temporarily during the sync process and re-enable them later
--snapshot=false
  1. By default, Geth limits the number of peers it connects to. You can increase this limit to speed up the block download process
--maxpeers=100

I hope these might help

3
  • if i disable snapshots, wont that do anything with my ability to trace transactions?
    – Sammers
    Commented Aug 15 at 15:01
  • Also, about the peercount. The search does not keep going after it found 3 peers: INFO [08-15|17:08:24.349] Looking for peers peercount=3 tried=55 static=0 even tho i specified --maxpeers=300
    – Sammers
    Commented Aug 15 at 15:14
  • Disabling snapshoting did not change things that much: INFO [08-15|17:15:29.041] Imported new chain segment number=4,397,304 hash=68b881..4283af blocks=157 txs=14549 mgas=726.411 elapsed=8.986s mgasps=80.831 age=6y11mo20h triedirty=0.00B. Around the same time
    – Sammers
    Commented Aug 15 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.