Skip to content

Proposal: ResourceRequirement #141

Closed

Description

@tetron
requirements:
 - class: ResourceRequirement
   coresMin:  1
   coresMax: 4
   ramMin 1024
   ramMax: 4096
   tmpdirMin: 1024
   tmpdirMax: 1024
   outdirMin: 1024
   outdirMax: 1024

"min" is the minimum amount of a resource that must be reserved to schedule a job. If "min" cannot be satisfied, the job should not be run.

"max" is the maximum amount of a resource that the job shall be permitted to use. If a node has sufficient resources, multiple jobs may be scheduled on a single node provided each job's "max" resource requirements are met. If a job attempts to exceed its "max" resource allocation, an implementation may deny additional resources, which may result in job failure.

If "min" is specified but "max" is not, then "max" == "min"
If "max" is specified by "min" is not, then "min" == "max".

It is an error if max < min.

If neither "min" nor "max" is specified for a resource, an implementation may provide a default.

cores: reserved number of CPU cores
ram: reserved RAM in megabytes (2**20)
tmpdir: reserved filesystem based storage for the designated temporary directory, in megabytes
outdir: reserved filesystem based storage for the designated output directory, in megabytes

Activity

  1. added this to the Draft 3 milestone on Oct 9, 2015
  2. satra commented on Oct 9, 2015

    @satra

    some scattered thoughts:

    in many cases these requirements are closely tied to the application at hand. in nipype we dissociate the spec for a tool, from the runtime requirements for a tool in a specific os/hardware environment for a specific application. it seems this is combing things, which means one would have to rewrite a cwl for a given application and runtime environment.

    every job may have a set of necessary dependencies/environments under which it operates (the dependency hell). draft 3 refers to environment variables for environment requirement, not a software dependency chain, and this proposal focuses on some hardware requirements. the following are equally valid resource requirements:

    • OSes/kernel versions
    • libraries/versions
    • etc.,.

    what about jobs that require:

    • multiple nodes on a cluster, say using mpi (version X)
    • overall memory across nodes rather than specific memory per node
    • io bandwidth

    what about jobs that can run under different hardware environments (e.g., opencl jobs)? would there be a way to specify a preferential order of hardware requirements?

    ps. in many cases the above information could be retrofitted to a CWL based on captured provenance.

  3. tetron commented on Oct 11, 2015

    @tetron
    MemberAuthor

    Hi Satra,

    This proposal isn't the final word on what kinds of resources a process can request, it is just a baseline proposal for describing CPU, RAM and disk requirements. The design of "requirements" in CWL is explicitly intended to be extensible so that requirements like "MPIRequirement" and "OpenCLRequirement" can be added later. CWL also provides "hints" which are similar to requirements except that failure to fulfill a hint is not a failure. So a "OpenCLRequirement" in the "hints" field would be interpreted as "use OpenCL if available".

    Regarding tying ResourceRequirement to a specific application, the above fields will permit expressions, so the resource requirement for a specific invocation of a tool can be calculated based on the specific inputs of that invocation. However this reminds me, missing from this proposal is a way to use the actual allocated resources in constructing the command invocation.

    Regarding OS & software requirements, this is a big topic that is also not part of this particular proposal. Currently the primary supported mechanism to deal with software dependencies is to use Docker. There's discussion about how to broaden away from Docker, see #80. If you have other ideas, please start another ticket.

  4. tetron commented on Nov 22, 2015

    @tetron
    MemberAuthor

    Merged.

  5. added a commit that references this issue on Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions