Skip to content

Pool cat-file processes per GitLab-Rails session

In an effort to simplify how Gitaly can reuse and reduce process resource consumption, Gitaly could keep an open cat-file process around for the current repository and Rails request. This would amortize the start up cost of this process on multiple Gitaly RPCs and allow for faster access to objects in the repository as these might be loaded into memory already.

The caching does not change the RPCs itself, but metadata might need to be added from the Rails side to let Gitaly have an understanding of when a Rails request is done. The kept around process needs to be killed so the OS could reclaim the memory, how and when it happens is not yet clear.

This feature should be introduced behind a feature flag.

Original issue:

By pooling processes, we could mean any of the following: - Reusing a single process for many requests of information (`git cat-file`) - Limiting an RPC/Server/Repo from too many simultaneous git processes
Edited by Zeger-Jan van de Weg
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information