Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

lsif-go OOMing in CI #27211

@chrismwendt

Description

@chrismwendt

Immediate remediation:

Next steps:

Notes

Wow, mem usage jumped from 200MB to 1.4GB:

  • v1.6.7: Alloc = 209 MiB, Sys = 315 MiB
  • v1.7.1: Alloc = 1423 MiB, Sys = 2246 MiB

The measurement was taken immediately after loadPackages in gorilla/mux.

For sourcegraph/sourcegraph: 6.6GB of Alloc, 12GB Sys 💥 That exceeds GH Actions runners 7GB memory. Prior to implementations, it used 2.2GB Alloc, 4GB Sys.

With loadMode2 below, it's 5.8GB of Alloc.

var loadMode = packages.NeedDeps | packages.NeedFiles | packages.NeedImports | packages.NeedSyntax | packages.NeedTypes | packages.NeedTypesInfo | packages.NeedName

var loadMode2 = packages.NeedDeps | packages.NeedTypes | packages.NeedTypesInfo

Removing NeedDeps drops perf (I don't know why), and lsif-go really needs types, so this seems to be the minimal subset.

Loading deps one at a time is suuuper slow, ~1s each and there are 1345 deps of sourcegraph/sourcegraph, so it would take ~22 minutes total. Loading all at once takes 15s.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions