git-pack-objects: excessive cpu and mem usage
Currently running GitLab CE 8.7.12 Omnibus in a corporate environment.
I'm seeing cyclic CPU spikes in Datadog on the host machine:
I've determined (during one of these spikes) that these are due to
git pack-objects processes hogging cpu and mem (e.g. possibly during
git clone of a large repo), as shown below:
My recommendation for you is to compile
pack-objects with pthreads, in order to optionally make use of the
--threads=<n> command-line option when calling
git-pack-objects (link to git doc). I'm hoping this could potentially alleviate the excessive cpu and mem load.
I've found one related issue: gitlab-ce#13376 which was unfortunately closed due to inactivity, so I'm opening this one while providing more details.