Search code examples
dockergitlabgitlab-celxd

Is is normal to have lxd process when running gitlab in a docker container?


I run a self hosted gitlab-ce:15.2.2-ce.0 inside a Docker container on my linux server, but I notice that the memory usage is very high. All is caused by this user called lxd. I thought lxd is another kind of container, not related to Docker at all. So my questions are:

  1. Is lxd used by gitlab ce?
  2. Is it normal for gitlab ce to use this much memory to run? My server have 8GB of ram. enter image description here

Thank you everyone.


Solution

  • GitLab runs most likely in your docker container under some user, which happens to have the same ID as the lxd user on your system, outside of the container. The processes that are running inside the container – bundle, gitaly, etc. are matched by top to the user with the ID that is defined in /etc/passwd, so there is nothing to worry about.

    You can check this by executing cat /etc/passwd on your host system and inside tho docker container and compare the results.

    To show the processes that only belong to the container, use docker top, e.g. docker top gitlab, if the name of your GitLab docker container is gitlab.


    Regarding memory usage, the official GitLab documentation explains how to make configuration changes if memory is tight and your team is small: https://docs.gitlab.com/omnibus/settings/memory_constrained_envs.html