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

Stress On workload machine in nomad #17

Open
thatsk opened this issue Jan 19, 2023 · 3 comments
Open

Stress On workload machine in nomad #17

thatsk opened this issue Jan 19, 2023 · 3 comments

Comments

@thatsk
Copy link

thatsk commented Jan 19, 2023

It would be nice if we generate a load on the client. This is a starting point but I think if we can generate load and nomad clients get high utilized then it should allocate allocation on another workload

@resmo
Copy link
Member

resmo commented Jan 20, 2023

see comment #19 (comment)

@thatsk
Copy link
Author

thatsk commented Jan 20, 2023

job "pumba" {
  datacenters = ["dc1"]
  type = "sysbatch"
  parameterized {
    meta_required = ["container_name"]
    meta_optional = ["cpu","memory","stress_time","timeout"]
  }

  group "pumba" {
    task "pumba" {
      driver = "docker"
      config {
        args = [
          "--random",
          "--log-level=info",
          "stress",
          "-d",
          "${NOMAD_META_stress_time}",
          "-stressors=--cpu ${NOMAD_META_cpu} --io 2 --vm 1 --vm-bytes ${NOMAD_META_memory} --timeout ${NOMAD_META_timeout}",
          "re2:^${NOMAD_META_container_name}"
         ]
        image = "gaiaadm/pumba:latest"
        network_mode = "bridge"
        volumes = [
            # Use absolute paths to mount arbitrary paths on the host
            "/var/run/docker.sock:/var/run/docker.sock"
        ]
      }
      resources {
        cpu    = 400
        memory = 512
      }
    }
  }
}

@thatsk
Copy link
Author

thatsk commented Jan 20, 2023

this is like I created a job for stress load on the container which is deployed on nodes. Let me know your thoughts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants