In other words, Apache Mesos
internal or docker
resource isolation mechanism works?
If started app A requires 40% of CPU resources, and app B requires 61% - B app couldn't start, even if A app in practice loads CPU on 10%?
In other words, Apache Mesos
internal or docker
resource isolation mechanism works?
If started app A requires 40% of CPU resources, and app B requires 61% - B app couldn't start, even if A app in practice loads CPU on 10%?
B app couldn't start, even if A app in practice loads CPU on 10%?
Yeah, because otherwise app A and app B would be both affected. Imagine A is using 40% of the cpu, app B, even declared it would like 61% cpu, can only use up to 60%. The reverse is also true (B using 61% and A can only get up to 39%).
So in general, no overbooking of resources. This is achieved in the resource allocation stage.
FYI how mesos launches tasks (tasks
is the mesos terminology, instead of apps
):
In mesos, tasks are launched by frameworks.
Say you have a mesos slave with 1 cpus and 1GB RAM.
Now there are 0.6 cpus left, but task B requires 0.61 cpu, so the framework can't launch the task B.
And don't confuse it with resource isolation, which is to guarantee the process of a task can't use more than it's allocated share of the cpu (and/or ram).
Mesos imposes resource isolation by using cgroups. Mesos also supports launching tasks as docker containers, but the resource isolation of docker containers is also using cgroups.