Skip to content

GitLab Next

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • omnibus-gitlab omnibus-gitlab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 982
    • Issues 982
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 62
    • Merge requests 62
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • omnibus-gitlabomnibus-gitlab
  • Merge requests
  • !4896

Expose new gitlab-exporter server type setting

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Matthias Käppler requested to merge mk-gitlab-exporter-server-setting into master Jan 08, 2021
  • Overview 21
  • Commits 1
  • Pipelines 6
  • Changes 6

What does this MR do?

We found that Puma is oversized for gitlab-exporter, which is a low traffic system and which does not benefit from concurrency. We have evidence that on SaaS a single-threaded Rack server such as WEBrick is sufficient to serve the relatively low volume of requests caused by Prometheus scrapers (all our in-app *_exporters already serve via WEBrick.)

We think that switching gitlab-exporter to WEBrick will result in lower memory requirements especially on single-node installations that run the GitLab Self-Monitoring service suite.

However, keeping this as a configuration switch leaves the door open to using more powerful servers such as Puma.

Related issues

  • gitlab#293687 (closed)
  • gitlab-exporter!127 (merged)
  • gitlab-org/charts/gitlab!1745 (merged)

Test plan

NOTE: this requires gitlab-exporter!127 (merged) to be merged first.

Step 1: Verify we run WEBrick by default now

  1. Enable gitlab self monitoring; see https://docs.gitlab.com/ee/administration/monitoring/gitlab_self_monitoring_project/
  2. Ensure gitlab-exporter is running, e.g. gitlab-ctl status gitlab-exporter
  3. Ensure it is running on WEBrick, e.g. by inspecting /var/log/gitlab/gitlab-exporter/current
2021-01-11_10:29:42.52692 [2021-01-11 10:29:42] INFO  WEBrick 1.6.0
2021-01-11_10:29:42.52694 [2021-01-11 10:29:42] INFO  ruby 2.7.2 (2020-10-01) [x86_64-linux]
2021-01-11_10:29:42.52735 == Sinatra (v2.0.8.1) has taken the stage on 9168 for development with backup from WEBrick
2021-01-11_10:29:42.52755 [2021-01-11 10:29:42] INFO  WEBrick::HTTPServer#start: pid=6426 port=9168

Step 2: Change the Rack server

  1. Edit /etc/gitlab/gitlab.rb.
  2. Set the following
    gitlab_exporter['server_name'] = 'puma'
  3. Save the file and reconfigure GitLab for the changes to take effect.
  4. Repeat the above steps to verify it is now running Puma.

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated. See: gitlab!51322 (merged)
  • Tests added
  • [-] Integration tests added to GitLab QA; We are not changing application behavior, and gitlab-exporter is not part of the existing test suite anyway.
  • Equivalent MR/issue for the GitLab Chart opened: gitlab-org/charts/gitlab!1745 (merged)
Edited Jan 12, 2021 by Matthias Käppler
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: mk-gitlab-exporter-server-setting