3
0

OP#179 add service control units for memory consumption

This commit is contained in:
2025-12-03 12:24:44 +01:00
parent c1f8eb8adf
commit 1c95467582
4 changed files with 21 additions and 0 deletions

View File

@@ -17,6 +17,11 @@
# @param [String] ps_retention_time tsdb retention time
# @param [String] ps_retention_size tsdb retention size
# @param [String] ps_wal_seg_size WAL segment size
# @param [String] ps_max_mem hard memory ceiling
# @param [String] ps_high_mem soft limit to make kernel reclaim earlier
# @param [String] ps_swap_mem allow swap, but limit it
# @param [String] ps_oom_score OOM killer choosing prometheus
# @param [String] ps_max_procs reduce parallel WAL replay workers
##############################################################################
class prometheus_cd::params (
@@ -45,6 +50,13 @@ class prometheus_cd::params (
String $ps_retention_size = '20GB',
String $ps_wal_seg_size = '50MB',
# service
String $ps_max_mem = '6G',
String $ps_high_mem = '5G',
String $ps_swap_mem = '4G',
String $ps_oom_score = '500',
String $ps_max_procs = '1',
) {
# defaults
$fqdn = $facts['networking']['fqdn']