You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benno Evers (JIRA)" <ji...@apache.org> on 2018/10/01 13:44:00 UTC
[jira] [Created] (MESOS-9280) Allow specification of static
reservations relative to the total resources
Benno Evers created MESOS-9280:
----------------------------------
Summary: Allow specification of static reservations relative to the total resources
Key: MESOS-9280
URL: https://issues.apache.org/jira/browse/MESOS-9280
Project: Mesos
Issue Type: Improvement
Reporter: Benno Evers
The current user interface for creating static reservations is described here:
http://mesos.apache.org/documentation/latest/reservation/
In summary, to create a static reservation, an operator needs to subdivide the available resources on an agent into reserved an unreserved resources, like this:
{noformat}
mesos-slave --resources="cpus:4;mem:2048;cpus(ads):8;mem(ads):4096" [...]
{noformat}
However, this can result in some awkward interactions when trying to change static reservations
1) *Requirement of an explicit upper bound*. By default, an agent will offer all CPU's and all Memory of its host machine. However, an agent with the above configuration running on a machine with e.g. 32 cpus will still only offer 12 of them, 8 for `ads` and 4 for general use.
For an operator planning to deploy configuration to a diverse set of machines, it seems to be required to write a script to get the total amount of available resources, and ensure that it is re-run periodically to capture hardware changes - duplicating functionality that Mesos already offers out-of-the-box.
2) *Interaction with ranges*. A configuration like
{noformat}
mesos-slave --resources="ports:[0-32655];ports(__internal):[22-22]" [...]
{noformat}
will lead to the master still offering port 22 to all frameworks, because the master thinks that the reserved port is an additional item of the "ports" resource.
On the other hand, a configuration like
{noformat}
mesos-slave --resources="ports(__internal):[22-22]" [...]
{noformat}
leaves the master knowing only about the existence of the single, reserved port 22.
Again, for an operator planning to reserve this port across a range of diverse agents, the only way seems to write a script parsing and processing the existing configuration and then slicing up the ranges like this:
{noformat}
mesos-slave --resources="ports:[0-21],[23-32655];ports(__internal):[22-22]" [...]
{noformat}
Ideally, it would be possible to specify static reservations as a subtraction from the total, i.e. being able to say "Reserve 4 GiB of memory for role X" instead of saying "Reserve 4GiB for role X and 4GiB for general use".
Doing so would probably require introducing some additional syntax to the resource specification strings.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)