You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Daniel <da...@abde.me> on 2015/12/04 10:44:41 UTC

Can tasks from multiple frameworks simultaneously run on the same slave node?

Hi, I'm confused with Mesos's resource offering mechanism:

(a) An offer includes all available resources in a slave node.

(b) A framework would occupy the resources associated with an offer,  regardless of whether the resources were actually used to launch tasks,  unless the offer was explicitly declined by calling declineOffer(offerId).

(c) An offer must be declined in its entirety.

Then it seems that if a framework does not decline an offer from a slave node, other frameworks have no access to the resources on the same slave node. Am I correct? Can tasks from mulliple frameworks simultaneously run on the same slave node?

Thanks a lot :-)

Re: Can tasks from multiple frameworks simultaneously run on the same slave node?

Posted by Klaus Ma <kl...@gmail.com>.
re (a): Yes, it's current behavior; but MESOS-3765
<https://issues.apache.org/jira/browse/MESOS-3765> is to enhance it.
re (b): partly:
    0. I'm not sure I understand your point on "actually used to launch
tasks", but my point is that Mesos did not know whether "task" is right;
Mesos depedent on framework (executor) to report correct status. But Mesos
can monitor some status such as executor crash.
    1. if launchTask with 1 CPU, and the used offer include 3 CPU; the
other 2 CPU will return to allocator
    2. And there is offer_timout in master to get resources back

re (c): nop, offer timeout and un-used resources will return resources; and
if the resources did not match the requirement, framework can also decline
it.

If the resources are available, other framework can launch tasks. So
multiple framework may launch tasks in the same slave. And there's several
features to enhance multi-tenant, such as Quota (MESOS-1791
<https://issues.apache.org/jira/browse/MESOS-1791>), Optimistic Offer (
MESOS-1607 <https://issues.apache.org/jira/browse/MESOS-1607>) and
Implicit/Dynamic Roles and so on.



----
Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
Platform Symphony/DCOS Development & Support, STG, IBM GCG
+86-10-8245 4084 | klaus1982.cn@gmail.com | http://k82.me

On Fri, Dec 4, 2015 at 5:44 PM, Daniel <da...@abde.me> wrote:

> Hi, I'm confused with Mesos's resource offering mechanism:
>
> (a) An offer includes all available resources in a slave node.
>
> (b) A framework would occupy the resources associated with an offer,
> regardless of whether the resources were actually used to launch tasks,
> unless the offer was explicitly declined by calling declineOffer(offerId).
>
> (c) An offer must be declined in its entirety.
>
> Then it seems that if a framework does not decline an offer from a slave
> node, other frameworks have no access to the resources on the same slave
> node. Am I correct? Can tasks from mulliple frameworks simultaneously run
> on the same slave node?
>
> Thanks a lot :-)
>

Re: Can tasks from multiple frameworks simultaneously run on the same slave node?

Posted by Guangya Liu <gy...@gmail.com>.
Just want to show more detail for offer_timeout, currently, there is no
default value for it, you may want to specify a value such as "5s" when
start up mesos master. Then if the offer was not handled in 5s, it will be
returned to master automatically.

Cited from https://github.com/apache/mesos/blob/master/docs/configuration.md

--offer_timeout=VALUEDuration of time before an offer is rescinded from a
framework.

This helps fairness when running frameworks that hold on to offers, or
frameworks that accidentally drop offers.

Thanks,

Guangya

On Fri, Dec 4, 2015 at 5:44 PM, Daniel <da...@abde.me> wrote:

> Hi, I'm confused with Mesos's resource offering mechanism:
>
> (a) An offer includes all available resources in a slave node.
>
> (b) A framework would occupy the resources associated with an offer,
> regardless of whether the resources were actually used to launch tasks,
> unless the offer was explicitly declined by calling declineOffer(offerId).
>
> (c) An offer must be declined in its entirety.
>
> Then it seems that if a framework does not decline an offer from a slave
> node, other frameworks have no access to the resources on the same slave
> node. Am I correct? Can tasks from mulliple frameworks simultaneously run
> on the same slave node?
>
> Thanks a lot :-)
>

Re: Can tasks from multiple frameworks simultaneously run on the same slave node?

Posted by Jan Schlicht <ja...@mesosphere.io>.
Hi Daniel,

this depends on your framework: Mesos assumes that a framework is "well
behaved", i.e. only requests the resources that it really needs. A
framework can control this using SchedulerDriver::requestResources() call.
Therefore a framework might not take all available resources of an agent.
A resource offer may be offered to other frameworks, the first one to
launch a task via SchedulerDriver::launchTasks will get them. If a
framework does not accept/decline an offer in time, it might already be
taken. If no accept/decline arrives at the master after a certain amount of
time, these resources are made available again.


On Fri, Dec 4, 2015 at 10:44 AM, Daniel <da...@abde.me> wrote:

> Hi, I'm confused with Mesos's resource offering mechanism:
>
> (a) An offer includes all available resources in a slave node.
>
> (b) A framework would occupy the resources associated with an offer,
> regardless of whether the resources were actually used to launch tasks,
> unless the offer was explicitly declined by calling declineOffer(offerId).
>
> (c) An offer must be declined in its entirety.
>
> Then it seems that if a framework does not decline an offer from a slave
> node, other frameworks have no access to the resources on the same slave
> node. Am I correct? Can tasks from mulliple frameworks simultaneously run
> on the same slave node?
>
> Thanks a lot :-)
>



-- 
*Jan Schlicht*
Distributed Systems Engineer, Mesosphere