How does Marathon limit resources to directly called applications?

I am experimenting with Mesos + Marathon and start simply by creating a small β€œapplication” consisting of a script loop that infinitely logs a message every 5 seconds. When I provide this application, I can allocate various memory and processor resources, which will lead me to my question:

If a marathon spawns a shell script directly, then how can it limit the use of script resources? This script can do and run anything to consume all available resources.

I understand that Docker or some other isolation mechanism limits what the process can do, but I have not configured this (explicitly). Is this the creation of some kind of container "on the fly" without the need for its explicit configuration? I am testing OS X.

+4
source share
1 answer

Mesos only supports Posix protection on Mac computers, which is much more to monitor than the actual resource limit, so testing Mesos on a Mac will not be able to demonstrate true resource isolation.

If you are testing Mesos on a Linux / VM machine, you can install:

--isolation='cgroups/cpu,cgroups/mem'

, , script/ . cgroups , / ( ), ( ), .

, Mesos 0.21 -, gpu, ..

Docker (0,20+), :

--containerizers='docker,mesos'

, . Docker - , Docker, Mesos.

Mesosphere, Mesos, /etc/mesos-slave, :

echo 'docker,mesos' > /etc/mesos-slave/containerizers
+7

Source: https://habr.com/ru/post/1568262/


All Articles