Hi all!

I’ve been toying around this evening with CPU resource isolation in Mesos - 
specifically with the Docker Containerizer.

It seems the Docker Containerizer (via experimentation and peeking at the 
source) modifies the relative CPU weight for the docker containers running on 
the slave in order to isolate the container's CPU usage. This of course isn’t a 
hard limit, and allows services to burst up to the full resources of the slave 
as long as no other tasks are consuming resources running on that server. It 
looks like the cpu isolator for the Mesos containerizer already has support for 
cgroup/cpu isolation and even an ability to enable CFS support via the command 
line flag —cgroups_enable_cfs. When I enable this flag, the Docker 
Containerizer doesn’t seem to use it at all or pass it onto the container at 
all. After googling, I came across this post: 
https://groups.google.com/forum/#!topic/docker-user/UF0GxTp3NHI where Hamilton 
was able to set the the relevant cgroup parameters to the docker daemon in 
order to provide a hard CPU limit on a running docker container.

I’m fairly new to Mesos - so I apologize if something obvious is flying right 
over my head :-) Does anyone have any advice / suggestions / thoughts on 
achieving such a hard CPU cap for docker containers running on Mesos? This 
isn’t a blocker for me - I am purely curious

Thanks!

Reply via email to