Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Apply Spread stanzas to Parameterized Jobs #5519

Closed
erhlee-bird opened this issue Apr 4, 2019 · 3 comments
Closed

[Feature] Apply Spread stanzas to Parameterized Jobs #5519

erhlee-bird opened this issue Apr 4, 2019 · 3 comments

Comments

@erhlee-bird
Copy link

Experiment:

Cluster with 9 clients.
Quickly schedule 1000 parameterized jobs with a spread stanza.

Job:

job "parameterized-test" {
  datacenters = ["dc1"]
  type = "batch"
  parameterized {}
  spread {
    attribute = "${node.unique.id}"
  }
  task "parameterized-test" {
    driver = "exec"
    config {
      command = "/bin/bash"
      args = ["-c", "sleep 10; date -u"]
    }
  }
}

Script:

#!/bin/bash

for _ in {1..1000}; do
  nomad job dispatch parameterized-test &
done

Version:

Nomad v0.9.0-rc1 (7c00ab4f3f37cfd1e258b38fd2ad99e7bc23e4c3)

Result:

client-1: ~1000 allocs
client-{2..9}: <5 allocs (if any)

This result is as I expected. It seems in line with what I'd expect from bin packing. Additionally, my understanding is that the spread stanza would work on multiple groups/tasks specified within the same job and not across a children of a parameterized job like in this case.

Feature Request:

The linked issue below mentions that "Spread at the cluster level is in a future roadmap".
That may be the solution to this request and tracking that issue may make this one redundant, but I wanted to specifically request that parameterized jobs are supported for spread-style scheduling so that in the future this experiment might result in more like ~100 allocs spread across the 9 clients.

@nickethier
Copy link
Member

Hey @erhlee-bird thanks for bringing this up!

We definitely want to support this usecase. You are correct in that cluster wide spreading will bring this desired functionality to dispatched jobs. Dispatched jobs, to the scheduler, appear as distinct unique jobs, so there is no specially casing that would cause cluster wide spread to not apply here.

I'm going to close this since it does dup the requested feature in #3690 so please head over there and 👍 the issue. We those reactions into account often when planning out our roadmap.

@fwkz
Copy link
Contributor

fwkz commented Feb 3, 2020

That may be the solution to this request and tracking that issue may make this one redundant, but I wanted to specifically request that parameterized jobs are supported for spread-style scheduling

I'm really interested in this specific use case too. 💪

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants