question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't support soft memory limition (memory reversation) or docker compose V3

See original GitHub issue

currently this project only supports docker compose v2 and doesn’t tallow us to specify the soft memory limitation.

suggestion: adding supports to docker compose file v3 resource section, which supports both hard and soft limitation

resources:
  limits:
    cpus: '0.001'
    memory: 50M
  reservations:
    cpus: '0.0001'
    memory: 20M

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:14
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
liorchencommented, May 3, 2017

any update on this? I’m also waiting for this feature

0reactions
mhglovercommented, Sep 21, 2017

@liorchen took a crack at memory reservation and has a pull request in, but it’s failing a couple of tests. If I get a chance, I’ll see if I can address those, but I wanted to bring them up here in case somebody else can get to them first. Here’s an example:

cat container_transform/tests/marathon-group.json | container-transform --input-type marathon --output-type compose | tail -18 | head -9
prometheus:
  cpu_shares: 512.0
  image: micahhausler/prometheus-mesos
  mem_limit: 134217728b
  mem_reservation: '[{''uri'': ''https://gist.githubusercontent.com/you/hash/raw/hash/config.yml'',
    ''extract'': False, ''executable'': False, ''cache'': False}]b'
  network_mode: bridge
  ports:
  - 9090:9090
Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting Memory And CPU Limits In Docker | Baeldung
To constrain memory, we need to use the m parameter: $ docker run -m 512m nginx. We can also set a soft limit...
Read more >
Runtime options with Memory, CPUs, and GPUs
--memory-reservation, Allows you to specify a soft limit smaller than --memory which is activated when Docker detects contention or low memory on the...
Read more >
Docker Compose — Memory Limits - Linux Hint
We shall be sticking to the version 2.4 for our docker-compose.yml files as ... 3 which is more recent but it doesn't support...
Read more >
How to specify Memory & CPU limit in docker compose version 3
But it fails while using version 3, putting them under deploy section doesn't seem worthy unless I am using swarm mode. Can somebody...
Read more >
How to Set Docker Memory and CPU Usage Limit - phoenixNAP
Limit Docker memory and CPU usage with the help of this guide. ... see are not set, setting the soft limit with --memory-reservation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found