You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Christoph Heer <ch...@thelabmill.de> on 2016/05/02 19:57:34 UTC

How to use a complete host

Hi everyone,

sometimes in my Mesos use-case it's required to ensure that my own framework is able to schedule a task which consume all resources of a machine. 

Do you have some advises how to implement such a scheduler. Is there another scheduler which already implemented something similar?

Thank you and best regards
Christoph 

Re: How to use a complete host

Posted by Staffan Larsen <st...@oracle.com>.
Instead of custom attributes to indicate the total resources available, you could use the /state endpoint on the agent to find out how much resources it has. Somewhat of a hack, but should work.

Thanks,
/Staffan

> On 2 maj 2016, at 23:43, Sharma Podila <sp...@netflix.com> wrote:
> 
> 
> This can't be achieved with the offer model as it stands today, unless you have only a single framework in the cluster. There is no visibility into what other resources are available on the agent which weren't offered to your framework. 
> 
> However, for the short term, you can use a hack to put in custom attributes that indicate the total amount of resources available on the agent. So, when you get the offer, you can verify if you got the offer for the entire agent's resources. 
> 
> Mesos-4138 is interesting, as Jeff pointed out.
> 
> 
> 
> 
> 
> On Mon, May 2, 2016 at 11:07 AM, haosdent <haosdent@gmail.com <ma...@gmail.com>> wrote:
> It sounds like you could reserve resources by a role in that machine. And then your framework launched by that role.
> 
> On Tue, May 3, 2016 at 1:57 AM, Christoph Heer <christoph@thelabmill.de <ma...@thelabmill.de>> wrote:
> Hi everyone,
> 
> sometimes in my Mesos use-case it's required to ensure that my own framework is able to schedule a task which consume all resources of a machine.
> 
> Do you have some advises how to implement such a scheduler. Is there another scheduler which already implemented something similar?
> 
> Thank you and best regards
> Christoph
> 
> 
> 
> -- 
> Best Regards,
> Haosdent Huang
> 


Re: How to use a complete host

Posted by Sharma Podila <sp...@netflix.com>.
This can't be achieved with the offer model as it stands today, unless you
have only a single framework in the cluster. There is no visibility into
what other resources are available on the agent which weren't offered to
your framework.

However, for the short term, you can use a hack to put in custom attributes
that indicate the total amount of resources available on the agent. So,
when you get the offer, you can verify if you got the offer for the entire
agent's resources.

Mesos-4138 is interesting, as Jeff pointed out.





On Mon, May 2, 2016 at 11:07 AM, haosdent <ha...@gmail.com> wrote:

> It sounds like you could reserve resources by a role in that machine. And
> then your framework launched by that role.
>
> On Tue, May 3, 2016 at 1:57 AM, Christoph Heer <ch...@thelabmill.de>
> wrote:
>
>> Hi everyone,
>>
>> sometimes in my Mesos use-case it's required to ensure that my own
>> framework is able to schedule a task which consume all resources of a
>> machine.
>>
>> Do you have some advises how to implement such a scheduler. Is there
>> another scheduler which already implemented something similar?
>>
>> Thank you and best regards
>> Christoph
>>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>

Re: How to use a complete host

Posted by haosdent <ha...@gmail.com>.
It sounds like you could reserve resources by a role in that machine. And
then your framework launched by that role.

On Tue, May 3, 2016 at 1:57 AM, Christoph Heer <ch...@thelabmill.de>
wrote:

> Hi everyone,
>
> sometimes in my Mesos use-case it's required to ensure that my own
> framework is able to schedule a task which consume all resources of a
> machine.
>
> Do you have some advises how to implement such a scheduler. Is there
> another scheduler which already implemented something similar?
>
> Thank you and best regards
> Christoph
>



-- 
Best Regards,
Haosdent Huang

Re: How to use a complete host

Posted by Jeff Schroeder <je...@computer.org>.
In addition to actually using roles, you might also consider subscribing to
MESOS-4138, which will implement this idea in a generic way (but won't help
you today).

On Monday, May 2, 2016, Christoph Heer <ch...@thelabmill.de> wrote:

> Hi everyone,
>
> sometimes in my Mesos use-case it's required to ensure that my own
> framework is able to schedule a task which consume all resources of a
> machine.
>
> Do you have some advises how to implement such a scheduler. Is there
> another scheduler which already implemented something similar?
>
> Thank you and best regards
> Christoph
>


-- 
Text by Jeff, typos by iPhone