Skip to content

Add Rss Memory Growth monitor for Watchdog

Nikola Milojevic requested to merge add-rss-growth-monitor-to-watchdog into master

What does this MR do and why?

This MR adds RssMemoryGrowth monitor for Puma.

it also adds support for easier monitor configuration

    if Gitlab::Runtime.puma?
      watchdog.configure(&Gitlab::Memory::Watchdog::Configurator.configure_for_puma)
    elsif Gitlab::Runtime.sidekiq?
      watchdog.configure(&Gitlab::Memory::Watchdog::Configurator.configure_for_sidekiq)
    else
      watchdog.configure(&Gitlab::Memory::Watchdog::Configurator.configure_for_others)
    end

Gitlab::Memory::Watchdog::Configure.configure_for_puma configures watchdog.

Backward compatibility with PWK is preserved by configuring RssMemoryGrowth to use puma[:per_worker_max_memory_mb] for memory_limit.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to: #379198 (closed)

Edited by Nikola Milojevic

Merge request reports