Thanks for the explanation Tom, yeah I just figured that out by reading your code! You're touching the memory.soft_limit_in_bytes and memory.limit_in_bytes directly.
Still curios to understand in which situations Mesos Slave would call the external containerizer to update the resource limits of a container? My understanding was that once resource allocation happens for a task, resources are not taken away until the task exits[fails, crashes or finishes] or Mesos asks the slave to kill the task. On Wed, Dec 3, 2014 at 2:47 AM, Tom Arnfeld <[email protected]> wrote: > Hi Diptanu, > > That's correct, the ECP has the responsibility of updating the resource > for a container, and it will do as new tasks are launched and killed for an > executor. Since docker doesn't support this, our containerizer (Deimos does > the same) goes behind docker to the cgroup for the container and updates > the resources in a very similar way to the mesos-slave. I believe this is > also what the built in Docker containerizer will do. > > > https://github.com/duedil-ltd/mesos-docker-containerizer/blob/master/containerizer/commands/update.py#L35 > > Tom. > > -- > > Tom Arnfeld > Developer // DueDil > > > On Wed, Dec 3, 2014 at 10:45 AM, Diptanu Choudhury <[email protected]> > wrote: > >> Hi, >> >> I had a quick question about the external containerizer. I see that once >> the Task is launched, the ECP can receive the update calls, and the >> protobuf message passed to ECP with the update call is >> containerizer::Update. >> >> This protobuf has a Resources [list] field so does that mean Mesos might >> ask a running task to re-adjust the enforced resource limits? >> >> How would this work if the ECP was launching docker containers because >> Docker doesn't allow changing the resource limits once the container has >> been started? >> >> I am wondering how does Deimos and mesos-docker-containerizer handle this. >> >> -- >> Thanks, >> Diptanu Choudhury >> Web - www.linkedin.com/in/diptanu >> Twitter - @diptanu <http://twitter.com/diptanu> >> > > -- Thanks, Diptanu Choudhury Web - www.linkedin.com/in/diptanu Twitter - @diptanu <http://twitter.com/diptanu>

