Reputation: 153
We have this scenario.
We have 3/3 master/slave arch for Mesos.
Each sleeve is identical, 4GB RAM and 4 Core CPUs.
We have started 10 marathon Apps with 1core CPU and 1GB RAM. We started the containers, but not utilizing them, as per the system it's saying 97% CPU is free.
Now, we are trying to start an another container with a 3Core CPU and 2GB RAM.
Unfortunately, we are not able to start the container, as per the Mesos logs, it's saying that marathon has declined the offer, but all slave nodes are not doing anything. Marathon apps stayed in Deployment state itself.
If mesos is not able to allocate resources to the marathon app (If containers are not utilizing the resources), then what's the use of Docker integration here.
As per my understanding:
Once an offer is accepted by marathon app, even if docker is not using that resource, mesos is thinking like that resources are already utilizing by the app. But if the container is not utilizing any resources, mesos need to collect the available resources and allocate to next marathon application.
Instead of that once an offer is assigned to marathon App, Mesos is subtracting the allocated resources from the total resources.
We are not fully utilizing the Docker features in Mesos/Marathon.
Let me know any suggestions and answers.
Thank you
Upvotes: 0
Views: 1641
Reputation: 3716
Mesos/Marathon actually considers the allocated 10*(1GB + 1CPU), because that is the max your app(s) is allowed to use. And so yes your understanding is correct.
In my opinion you have at least 2 options
Upvotes: 1
Reputation: 1051
Mesos tracks "allocation" and not the actual usage. If your app is not doing anything, it doesn't mean it won't do anything in the next moment. That means, if your app requested 1 CPU, this CPU is reserved for the app.
Now, if you don't want to precisely estimate resources your app is using, you may want to look at oversubscription in Mesos. You must keep in mind though, that once oversubscribed resources are requested by the app, for which these resources have been allocated, apps using oversubscribed resources may be terminated.
Upvotes: 2