ethereum-optimism / op-geth

GNU Lesser General Public License v3.0
254 stars 652 forks source link

op-geth storage update really slow #318

Open Rogalek opened 1 month ago

Rogalek commented 1 month ago

System information

OP-Geth version: v1.101315.0 OS & Version: Ubuntu 22.04

Issue

Hello I have a problem with my op-geth. I started noticing that every few blocks, some block is having lags and later all the blocks are lagged.

I checked logs:

INFO [05-15|03:49:55.353] Imported new potential chain segment     number=120,073,108 hash=1a8e1c..47ceba blocks=1         txs=3          mgas=6.790   elapsed=1.782s       mgasps=3.808   snapdiffs=1.75MiB    triedirty=683.11MiB
INFO [05-15|03:49:55.357] Chain head was updated                   number=120,073,108 hash=1a8e1c..47ceba root=ea42f3..df4de7 elapsed=2.894955ms
INFO [05-15|03:50:00.853] Imported new potential chain segment     number=120,073,109 hash=65ae97..b4a7ab blocks=1         txs=13         mgas=21.869  elapsed=5.492s       mgasps=3.982   snapdiffs=1.80MiB    triedirty=686.77MiB
INFO [05-15|03:50:02.383] Chain head was updated                   number=120,073,109 hash=65ae97..b4a7ab root=0e6af5..0c9dd8 elapsed=7.05042ms

and you can see that elapsed times are really high, even 5s.

I checked also dashboard with metrics and I could see that the biggest issue is storage update - avg time for past 1h is almost 2s and max 3.3s. image

CPU: image

Memory: image

Disk: image

Ideally for me would be if block processing and updating would be always less than 1s.

Steps to reproduce the behaviour

Run a node from source or docker (I tried both).