3 ms·
Our entrypoint configures the unicorn workers before starting using a chef omnibus call. So we grab the memory and cpus using Ohai: https://gitlab.com/gitlab-or
by twk3 9y ago
Our entrypoint configures the unicorn workers before starting using a chef omnibus call. So we grab the memory and cpus using Ohai: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/attributes/default.rb#L303 https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/fil... and do cpus+1
^This is pretty much we do by default for all our regular package installs, but in some of our Kubernetes Helm charts we instead statically configure the pod resources and unicorn workers. (Defaulting to 1cpu - 2workers per front-end pod)
eg:
https://gitlab.com/charts/charts.gitlab.io/blob/master/charts/gitlab/values.yaml#L198 https://gitlab.com/charts/charts.gitlab.io/blob/master/chart...
As someone mentioned in this thread, using the downward api might be a cool way to configure the workers.