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.