Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-1120

Allow unit specifiers in core configs

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Currently, only absolute values for resources are allowed in configurations read by the core. We should allow unit specifiers as well (M, Mi, G, Gi, etc.).

      From YUNIKORN-165:

      Internally we must move to integers for the representation, just to fix the issue described in YUNIKORN-1105. We should be able to handle about 9 exa byte as the maximum size of a cluster using a standard int64 or 18 exa byte if we use an unsigned integer. Not sure if we will overflow that in any resources quickly.

      What I meant with the staying closer to what K8s does is to allow specifying the resources with a quantity suffix specifically in the configuration. This is what we currently require:

      resources:
          max:
              vcore: 21000
              memory: 610000 

      That specifies 21 cpu's (base is milli vcores) and 610GB for memory (base is 1MB). Not that simple to interpret. We should allow 610G, and like with the shim side we need to convert that to B. Same for the vcore, 21 should be converted to 21000 m cores etc.

      I would like to see  us support a configuration like this:

      resources:
           guaranteed:
              vcore: 2500m
              memory: 600G
           max:
              vcore: 10
              memory: 1T

      This is independent of how we represent the data in the REST specification. REST should align with the base suffix: milli for vcores (base == 1e-3) and bytes / undefined for others (base == 1). So never a quantity suffix in REST, vcores always as milli vcores and all other resources as bytes or undefined.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ccondit Craig Condit
            ccondit Craig Condit
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment