Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker resource limits #433

Merged
merged 24 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e1e4822
Return removed staging CA for letsenrypt
YuryHrytsuk Oct 17, 2023
9cf3b35
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 18, 2023
75f265d
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 18, 2023
36844af
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 19, 2023
df29509
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 19, 2023
6f287f8
Fix missing $
YuryHrytsuk Oct 19, 2023
a4bce3e
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 20, 2023
2cc4a0f
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 20, 2023
8e76378
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 25, 2023
8a0909c
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 27, 2023
fe11b06
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 30, 2023
574d5b2
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 31, 2023
9cc8368
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Oct 31, 2023
04f2ba0
Remove PAYMENTS_AUTORECHARGE_DEFAULT_MIN_BALANCE
YuryHrytsuk Oct 31, 2023
08a9c51
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Nov 3, 2023
0c3d6aa
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Nov 9, 2023
f6eda96
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Nov 10, 2023
42ea788
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Nov 13, 2023
fe8e267
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Nov 13, 2023
25471fc
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Nov 14, 2023
6da1201
Intro docker limits to monitoring, traefik, portainer and regsitry st…
YuryHrytsuk Nov 14, 2023
c09d67b
Merge remote-tracking branch 'upstream/main'
YuryHrytsuk Nov 14, 2023
b97bc58
Merge branch 'main' into add-docker-limits
YuryHrytsuk Nov 14, 2023
4ba9bd4
ANE fixes
YuryHrytsuk Nov 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions services/monitoring/docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ services:
resources:
limits:
memory: 4096M
cpus: "2"
reservations:
memory: 4096M
memory: 2048M
cpus: "0.2"

prometheuscadvisor:
hostname: "{% raw %}{{.Service.Name}}{% endraw %}"
Expand Down Expand Up @@ -124,8 +126,10 @@ services:
resources:
limits:
memory: 4096M
cpus: "1"
reservations:
memory: 2048M
cpus: "0.2"

node-exporter:
image: prom/node-exporter:v1.6.1
Expand Down Expand Up @@ -161,8 +165,10 @@ services:
resources:
limits:
memory: 128M
cpus: "0.5"
reservations:
memory: 64M
cpus: "0.1"

nvidia-exporter:
image: mindprince/nvidia_gpu_prometheus_exporter:0.1
Expand All @@ -180,8 +186,10 @@ services:
resources:
limits:
memory: 64M
cpus: "0.5"
reservations:
memory: 32M
cpus: "0.1"

alertmanager:
image: prom/alertmanager:v0.25.0
Expand All @@ -202,8 +210,10 @@ services:
resources:
limits:
memory: 32M
cpus: "0.5"
reservations:
memory: 16M
cpus: "0.1"

cadvisor-exporter:
image: gcr.io/cadvisor/cadvisor:v0.47.2
Expand All @@ -224,8 +234,10 @@ services:
resources:
limits:
memory: 256M
cpus: "0.5"
reservations:
memory: 128M
cpus: "0.1"

docker-events-exporter:
image: itisfoundation/docker-events-exporter:latest
Expand All @@ -243,8 +255,10 @@ services:
resources:
limits:
memory: 64M
cpus: "0.5"
reservations:
memory: 32M
cpus: "0.1"

grafana:
image: grafana/grafana-oss:10.0.3
Expand Down Expand Up @@ -274,8 +288,10 @@ services:
resources:
limits:
memory: 256M
cpus: "0.5"
YuryHrytsuk marked this conversation as resolved.
Show resolved Hide resolved
reservations:
memory: 128M
cpus: "0.1"

grafana-image-renderer:
image: grafana/grafana-image-renderer:3.7.1
Expand All @@ -288,8 +304,10 @@ services:
resources:
limits:
memory: 512M
cpus: "0.5"
YuryHrytsuk marked this conversation as resolved.
Show resolved Hide resolved
reservations:
memory: 64M
cpus: "0.1"

smokeping-prober-exporter:
image: quay.io/superq/smokeping-prober:v0.7.1
Expand All @@ -313,8 +331,10 @@ services:
resources:
limits:
memory: 128M
cpus: "0.5"
YuryHrytsuk marked this conversation as resolved.
Show resolved Hide resolved
reservations:
memory: 32M
cpus: "0.1"

dcgm-exporter:
cap_add:
Expand All @@ -332,8 +352,10 @@ services:
resources:
limits:
memory: 512M
cpus: "0.5"
reservations:
memory: 256M
cpus: "0.1"
labels:
- prometheus-job=dcgm-exporter
- prometheus-port=9400
Expand All @@ -358,8 +380,10 @@ services:
resources:
limits:
memory: 128M
cpus: "0.5"
reservations:
memory: 64M{% for _stack in MONITORED_STACK_NAMES.split(",") if _stack != "" %}
memory: 64M
cpus: "0.1"{% for _stack in MONITORED_STACK_NAMES.split(",") if _stack != "" %}
{{_stack}}-postgres-exporter:
image: bitnami/postgres-exporter:0.13.2
networks:
Expand All @@ -374,8 +398,10 @@ services:
resources:
limits:
memory: 128M
cpus: "0.5"
reservations:
memory: 32M
cpus: "0.1"
{{_stack}}-redis-exporter:
image: oliver006/redis_exporter:v1.52.0-alpine
networks:
Expand All @@ -391,5 +417,7 @@ services:
resources:
limits:
memory: 64M
cpus: "0.5"
reservations:
memory: 32M{% endfor %}
memory: 32M
cpus: "0.1"{% endfor %}
14 changes: 14 additions & 0 deletions services/portainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ services:
- agent_network
deploy:
mode: global
resources:
limits:
cpus: "1"
memory: 100M
reservations:
cpus: "0.5"
memory: 50M

portainer:
image: portainer/portainer-ce:2.18.4
Expand All @@ -35,6 +42,13 @@ services:
deploy:
mode: replicated
replicas: 1
resources:
limits:
cpus: "1"
memory: 250M
YuryHrytsuk marked this conversation as resolved.
Show resolved Hide resolved
reservations:
cpus: "0.5"
memory: 80M
placement:
constraints: [node.role == manager]
labels:
Expand Down
7 changes: 7 additions & 0 deletions services/registry/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ services:
- public
- monitored
deploy:
resources:
limits:
memory: 1G
cpus: '2'
reservations:
memory: 150M
cpus: '0.5'
labels:
- traefik.enable=true
- traefik.docker.network=${PUBLIC_NETWORK}
Expand Down
2 changes: 2 additions & 0 deletions services/traefik/docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ services:
resources:
limits:
memory: 50M
cpus: '0.5'
reservations:
memory: 6M
cpus: '0.1'
networks:
- public

Expand Down