I think that you can use 'curl' to test, please refer to https://open.mesosphere.com/advanced-course/advanced-usage-of-marathon/
On Fri, Jan 15, 2016 at 4:22 PM, <humberto.caste...@telenor.com> wrote: > Thanks Haosdent, > > > > If what you say about Marathon is right (i.e., that Marathon’s constraints > only work with Mesos’ attributes), then I cannot use --resources="gpu(*):4", > since I have no way in Marathon to specify my job needs a GPU resource (at > least using the web interface), right? > > > > I guess I will have to experiment with attributes. > > > > Cheers, > > Humberto > > > > > > > > *From:* haosdent [mailto:haosd...@gmail.com] > *Sent:* 14. januar 2016 19:07 > *To:* user > *Subject:* Re: Share GPU resources via attributes or as custom resources > (INTERNAL) > > > > >Then, if a job is sent to the machine when the 4 GPUs are already busy, > the job will fail to start, right? > > I not sure this. But if job fail, Marathon would retry as you said. > > > > >a job is sent to the machine, all 4 GPUs will become busy > > If you specify your task only use 1 gpu in resources field. I think Mesos > could continue provide offers which have gpu. And I remember > Marathon constraints only could work with --attributes. > > > > On Fri, Jan 15, 2016 at 1:02 AM, <humberto.caste...@telenor.com> wrote: > > I have a machine with 4 GPUs and want to use Mesos+Marathon to schedule > the jobs to be run in the machine. Each job will use maximum 1 GPU and > sharing 1 GPU between small jobs would be ok. > I know Mesos does not directly support GPUs, but it seems I might use > custom resources or attributes to do what I want. But how exactly should > this be done? > > If I use --attributes="hasGpu:true", would a job be sent to the machine > when another job is already running in the machine (and only using 1 GPU)? > I would say all jobs requesting a machine with a hasGpu attribute would be > sent to the machine (as long as it has free CPU and memory resources). > Then, if a job is sent to the machine when the 4 GPUs are already busy, the > job will fail to start, right? Could then Marathon be used to re-send the > job after some time, until it is accepted by the machine? > > If I specify --resources="gpu(*):4", it is my understanding that once a > job is sent to the machine, all 4 GPUs will become busy to the eyes of > Mesos (even if this is not really true). If that is right, would this > work-around work: specify 4 different resources: gpu:A, gpu:B, gpu:C and > gpu:D; and use constraints in Marathon like this "constraints": [["gpu", > "LIKE", " [A-D]"]]? > > Cheers > > > > > > -- > > Best Regards, > > Haosdent Huang >