Skip to content

Commit 08ee76a

Browse files
committed
promtorture: switch to auto gomemlimit
Should do this for real deployment too
1 parent 6f66ffd commit 08ee76a

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

testcases/promtorture/scripts/kind-create.sh

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,29 @@ spec:
3838
# args to pass to the prometheus container, see kubectl explain prometheus.spec.additionalArgs
3939
additionalArgs:
4040
- name: web.enable-admin-api
41+
- name: web.enable-remote-write-receiver
42+
# https://prometheus.io/docs/prometheus/latest/feature_flags/#memory-snapshot-on-shutdown
43+
# pointless when we aren't using a PV, but should move to it
44+
# for BA anyway
45+
- name: enable-feature
46+
value: memory-snapshot-on-shutdown
47+
# https://prometheus.io/docs/prometheus/latest/feature_flags/#extra-scrape-metrics
48+
- name: enable-feature
49+
value: extra-scrape-metrics
50+
# https://prometheus.io/docs/prometheus/latest/feature_flags/#per-step-stats
51+
- name: enable-feature
52+
value: promql-per-step-stats
53+
# https://prometheus.io/docs/prometheus/latest/feature_flags/#auto-gomemlimit
54+
- name: enable-feature
55+
value: auto-gomemlimit
56+
- name: auto-gomemlimit.ratio
57+
value: "0.9"
58+
# https://prometheus.io/docs/prometheus/latest/feature_flags/#auto-gomaxprocs
59+
- name: enable-feature
60+
value: auto-gomaxprocs
61+
# https://prometheus.io/docs/prometheus/latest/feature_flags/#created-timestamps-zero-injection
62+
- name: enable-feature
63+
value: created-timestamp-zero-ingestion
4164
# this is strategically merged by the operator with the default spec, see kubectl explain prometheus.spec.containers
4265
containers:
4366
- name: config-reloader
@@ -60,15 +83,6 @@ spec:
6083
capabilities:
6184
drop:
6285
- ALL
63-
env:
64-
# Set the GOMEMLIMIT to a high proportion of the container's memory
65-
# limit, but not equal to it, so there's room for other processes,
66-
# runtime overhead, error margins in different usage computation
67-
# methods etc. We can refine this over time. I'm starting with 95%
68-
# of the pod RAM limit since we also have a config reloader container
69-
# etc. See https://pkg.go.dev/runtime
70-
- name: GOMEMLIMIT
71-
value: 450MiB
7286
resources:
7387
limits:
7488
cpu: 1000m

0 commit comments

Comments
 (0)