It's currently using a huge amount of memory especially on large repositories.
Which is currently a blocking point so we need to decrease their concurrency
so not everything fails on oom.
Checking a bit the code, currently the loader retrieves the full packfile and then parse it multiple times to ingest the dag objects.
We believe it's possible to retrieve packfiles incrementally.
This increases the communication with the server but that should be reducing the memory usage.
!76 (closed) actually increased the memory footprint to the point of getting ingestion killed
fast. So closed!
!136 (closed) (requires swh-loader-core!417 (merged) in the loader-core) is another attempt which tries to fetch
packfiles to ingest instead of one big packfile. The implementation is not entirely
satisfactory as it's not deterministic. It really depends on the connected nature of the
git repository graph we are trying to ingest (and the order of the refs we are ingestion
[3]). If it's fully connected, we will have a full packfile immediately (thus rendering
^ moot).
We tried to have a look at the depth parameter of the fetch_pack internally used by the
loader [2]. But that part is still fuzzy. Notably, how to determine what a good depth factor
could be.
[3] Another idea that was only discussed would be to make certain we first start by
ingesting in order tag references (under the assumption that we will then ingest mostly
in natural order the repository). Then focus on the remaining references (because mostly
there is a high probability that if we start with HEAD and/or master/main at first, we will
end up with mostly the overall repository in one one round).
[3] Another idea that was only discussed would be to make certain we first start by
ingesting in order tag references (under the assumption that we will then ingest mostly
in natural order the repository). Then focus on the remaining references (because mostly
there is a high probability that if we start with HEAD and/or master at firstz, we will
end up with the overall repository).
One good question got raised on the mailing list thread both by @douardda and @stsp.
Do we already know for sure what is actually causing the memory bloat?
I'm actually not sure yet.
So i gave a spin to [1] triggering a run on the most heavy and problematic origins with it (on
production nodes keybase/client and CocoaPods/Specs).
Let's see what result that gives (ongoing).
I'm actually not sure yet.
So i gave a spin to [1] triggering a run on the most heavy and problematic origins with it (on
production nodes keybase/client and CocoaPods/Specs).
Let's see what result that gives (ongoing).
Trigger other runs with memory-profiler instead. [1]
It's not perfect though. I cannot find the proper way to actually have the
legends as they described in their documentation. [2]
kubernetes/kubernetes, graph with memory over time: