seq-input-gelf icon indicating copy to clipboard operation
seq-input-gelf copied to clipboard

High memory consumption

Open baumheld opened this issue 2 years ago • 1 comments

After 2h (idle for the whole time) ~400MB

image

After start ~40MB

image

After some time the memory accumulates to 300-400 MB RAM. At the beginning seq-input-gelf sits around 40 MB RAM. My question is: Is 300-400 MB RAM considered normal? What would happen if I limit that containers memory to, let's say, 100MB?

This happens on our production server and also locally when testing with Docker Desktop.
I'm using TCP with non-blocking mode, HTTPS and Traefik as reverse proxy.

Also, the CPU for seq-input-gelf is always between 2-4% when everything is idle.

This is our stripped down docker-compose.yml file

version: "3.9"

x-deploy: &hardware-limits
  resources:
    limits:
      memory: 2G

volumes:
  seq:

services:
  seq:
    container_name: seq
    image: datalust/seq:2023.4
    deploy: *hardware-limits
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: seqsvr/Client/seqcli node health -s http://127.0.0.1/
      timeout: 5s
      start_period: 30s
      interval: 5s
      retries: 10
    ports:
      - "5341:5341"
    environment:
      ACCEPT_EULA: Y
    volumes:
      - seq:/data

  seq-gelf-monitor:
    container_name: seq-gelf-monitor
    image: datalust/seq-input-gelf:3.0
    deploy: *hardware-limits
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    depends_on:
      seq:
        condition: service_healthy
    stop_grace_period: 1s
    ports:
      - "127.0.0.1:12202:12201"
    environment:
      GELF_ADDRESS: tcp://0.0.0.0:12201
      SEQ_ADDRESS: http://seq:5341

baumheld avatar Nov 21 '23 16:11 baumheld

Hi @baumheld, thanks for reaching out.

It's quite high usage to see, but if it's stable, there's a good chance that the memory is simply not being reclaimed due to a lack of memory pressure.

I'd be concerned if memory use continues to rise, but otherwise, leaving it as-is seems to make the most sense (though by all means try a lower memory limit if resources are a concern).

Hope this helps, Nick

nblumhardt avatar Nov 23 '23 01:11 nblumhardt

Closing this as stale, if this pops up again we'll collect some more data and dig in.

nblumhardt avatar Jul 31 '24 04:07 nblumhardt