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

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

Open
minzhang28 opened this issue Mar 2, 2017 · 6 comments

Comments

@minzhang28
Copy link

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
@youcandanch
Copy link

youcandanch commented Mar 21, 2017

For what it's worth, compose v2 backported memory reservation, which ends up looking like:

version: '2'
services:
  memcached:
    image: memcached
    mem_limit: 128m
    mem_reservation: 64m

@youcandanch
Copy link

youcandanch commented Mar 21, 2017

I'd be happy to take a stab at this but probably won't get to it for a few weeks, if someone else has the time. I only really work with Compose/ECS, so I'm not 100% sure what the comparables are in K8/Marathon/Chronos/systemd either, but I'm sure I can kinda muck through it.

@micahhausler
Copy link
Owner

@antinescience that'd be great if you have time to work on it. I haven't had time to do much OSS lately, but I know k8s has has limits/requests

@liorchen
Copy link

liorchen commented May 3, 2017

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

@geemorin
Copy link

geemorin commented Jun 3, 2017

Seems there is a pull request for it only its failing on test coverage percentage threshold.

Moreover, i think the compose transformer supports v1 and v2 but outputs only version: '2'. Should it be splitted in 3 different transformers to ouput v1 v2 and v3 outputs?

@mhglover
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants