Skip to content

debug ensv2 indexing slowness #1982

@shrugs

Description

@shrugs

Current Findings

  • ran into late slowness (last ~6 weeks of realtime) where eps dropped from ~2-3k to 100
    • rpc cache was backfilled to -40hrs so that's not it
    • just overhead of omnichain ordering?
    • try multichain ordering?
  • ensv2/ENSv1Registry:NewOwner is still the worst offender just due to complexity. 16.5M events at 1.16ms/event, which seems fast is still ~5.5 hours alone. not sure how much further it could be optimized.
    • each NewOwner event in ensv2 results in more db ops than its subgraph counterpart
  • ponder in-memory cache is too small and/or is flushing to postgres too often?
    • how do we measure when ponder flushes to postgres
    • can we increase the in-memory cache size?
  • have ensureEvent return eventId and have ensure*Event accept it; because it's sometimes called twice in a handler, reduces db ops in those event handlers by 50% but there aren't that many of them, so probably looking at 1-5% tops.
  • try Promise.all parallelization for independent db ops, maybe ponder can make them more efficent

Metadata

Metadata

Assignees

Labels

devopsDevOps related

Type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions