debian-mirror-gitlab/doc/administration/monitoring/performance/index.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
3 KiB
Markdown
Raw Normal View History

2020-06-23 00:09:42 +05:30
---
stage: Monitor
2022-04-04 11:22:00 +05:30
group: Respond
2021-02-22 17:27:13 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-06-23 00:09:42 +05:30
---
2021-03-11 19:13:27 +05:30
# GitLab Performance Monitoring **(FREE SELF)**
2018-03-17 18:26:18 +05:30
GitLab comes with its own application performance measuring system as of GitLab
2021-01-29 00:20:46 +05:30
8.4, called "GitLab Performance Monitoring". GitLab Performance Monitoring is available in both the
2018-03-17 18:26:18 +05:30
Community and Enterprise editions.
Apart from this introduction, you are advised to read through the following
2021-01-03 14:25:43 +05:30
documents to understand and properly configure GitLab Performance Monitoring:
2018-03-17 18:26:18 +05:30
- [GitLab Configuration](gitlab_configuration.md)
2020-05-24 23:13:21 +05:30
- [Prometheus documentation](../prometheus/index.md)
2018-03-17 18:26:18 +05:30
- [Grafana Install/Configuration](grafana_configuration.md)
- [Performance bar](performance_bar.md)
- [Request profiling](request_profiling.md)
## Introduction to GitLab Performance Monitoring
GitLab Performance Monitoring makes it possible to measure a wide variety of statistics
including (but not limited to):
- The time it took to complete a transaction (a web request or Sidekiq job).
- The time spent in running SQL queries and rendering HAML views.
- The time spent executing (instrumented) Ruby methods.
- Ruby object allocations, and retained objects in particular.
- System statistics such as the process' memory usage and open file descriptors.
- Ruby garbage collection statistics.
## Metric Types
Two types of metrics are collected:
1. Transaction specific metrics.
1. Sampled metrics, collected at a certain interval in a separate thread.
### Transaction Metrics
Transaction metrics are metrics that can be associated with a single
transaction. This includes statistics such as the transaction duration, timings
2021-01-29 00:20:46 +05:30
of any executed SQL queries, time spent rendering HAML views, and so on. These metrics
2018-03-17 18:26:18 +05:30
are collected for every Rack request and Sidekiq job processed.
### Sampled Metrics
Sampled metrics are metrics that can't be associated with a single transaction.
Examples include garbage collection statistics and retained Ruby objects. These
metrics are collected at a regular interval. This interval is made up out of two
parts:
1. A user defined interval.
1. A randomly generated offset added on top of the interval, the same offset
can't be used twice in a row.
The actual interval can be anywhere between a half of the defined interval and a
half above the interval. For example, for a user defined interval of 15 seconds
the actual interval can be anywhere between 7.5 and 22.5. The interval is
2021-01-29 00:20:46 +05:30
re-generated for every sampling run instead of being generated one time and reused
2018-03-17 18:26:18 +05:30
for the duration of the process' lifetime.
2021-03-08 18:12:59 +05:30
User defined intervals can be specified by means of environment variables.
The following environment variables are recognized:
- `RUBY_SAMPLER_INTERVAL_SECONDS`
- `DATABASE_SAMPLER_INTERVAL_SECONDS`
- `ACTION_CABLE_SAMPLER_INTERVAL_SECONDS`
- `PUMA_SAMPLER_INTERVAL_SECONDS`
- `THREADS_SAMPLER_INTERVAL_SECONDS`
- `GLOBAL_SEARCH_SAMPLER_INTERVAL_SECONDS`