diff --git a/README.md b/README.md index 13aa166..426856c 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,15 @@ Better Stack collector is the easiest and recommended way of integrating Better [Getting started ⇗](https://betterstack.com/docs/logs/collector/) +## Resource requirements + +| Deployment | Soft memory reservation | Hard caps | Host/node guideline | +| --- | --- | --- | --- | +| Collector only | 512 MiB | 1.2 vCPU, 1 GiB memory | 2 vCPU, 2 GiB memory | +| Full tracing (collector + eBPF) | 2 GiB | 2.2 vCPU, 3 GiB memory | 4 vCPU, 4 GiB memory | + +The collector-only guideline was validated with eBPF stopped. `mem_reservation` is a soft memory target; `mem_limit` and `cpus` are hard caps, and Docker does not reserve CPU. Host/node guidelines are planning targets: the reservation and enough headroom up to the caps must remain available after the OS and other applications consume their share. + ## Need help? Please let us know at [hello@betterstack.com](mailto:hello@betterstack.com). We're happy to help! diff --git a/docker-compose.seccomp.yml b/docker-compose.seccomp.yml index fdf907f..0410588 100644 --- a/docker-compose.seccomp.yml +++ b/docker-compose.seccomp.yml @@ -7,6 +7,9 @@ services: container_name: better-stack-collector restart: always uts: host + cpus: 1.2 + mem_reservation: 512m + mem_limit: 1024m security_opt: - seccomp=collector-seccomp.json healthcheck: @@ -45,7 +48,9 @@ services: pid: host uts: host network_mode: host - mem_limit: 3072m + cpus: 1.0 + mem_reservation: 1536m + mem_limit: 2048m healthcheck: test: ["CMD-SHELL", "if [ -x /var/lib/better-stack/ebpf/healthcheck.sh ]; then /var/lib/better-stack/ebpf/healthcheck.sh; else exit 0; fi"] interval: 30s diff --git a/docker-compose.yml b/docker-compose.yml index 0a2b895..c64a2d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,9 @@ services: container_name: better-stack-collector restart: always uts: host + cpus: 1.2 + mem_reservation: 512m + mem_limit: 1024m healthcheck: test: ["CMD-SHELL", "if [ -x /var/lib/better-stack/collector/healthcheck.sh ]; then /var/lib/better-stack/collector/healthcheck.sh; else exit 0; fi"] interval: 60s @@ -43,7 +46,9 @@ services: pid: host uts: host network_mode: host - mem_limit: 3072m + cpus: 1.0 + mem_reservation: 1536m + mem_limit: 2048m healthcheck: test: ["CMD-SHELL", "if [ -x /var/lib/better-stack/ebpf/healthcheck.sh ]; then /var/lib/better-stack/ebpf/healthcheck.sh; else exit 0; fi"] interval: 30s diff --git a/swarm/docker-compose.swarm-ebpf.yml b/swarm/docker-compose.swarm-ebpf.yml index eb43505..9ded2c3 100644 --- a/swarm/docker-compose.swarm-ebpf.yml +++ b/swarm/docker-compose.swarm-ebpf.yml @@ -20,7 +20,9 @@ services: pid: host uts: host network_mode: host - mem_limit: 3072m + cpus: 1.0 + mem_reservation: 1536m + mem_limit: 2048m healthcheck: test: ["CMD-SHELL", "if [ -x /var/lib/better-stack/ebpf/healthcheck.sh ]; then /var/lib/better-stack/ebpf/healthcheck.sh; else exit 0; fi"] interval: 30s