18 cores, 2k/core, no config
Allocated Resources
CPU Memory Disk Alloc Count
5000/36000 MHz 512 MiB/16 GiB 600 MiB/12 GiB 2
...
Attributes
| package main | |
| import ( | |
| "fmt" | |
| "testing" | |
| "github.com/hashicorp/nomad/ci" | |
| "github.com/hashicorp/nomad/client/lib/idset" | |
| "github.com/hashicorp/nomad/client/lib/numalib" | |
| "github.com/hashicorp/nomad/client/lib/numalib/hw" |
18 cores, 2k/core, no config
Allocated Resources
CPU Memory Disk Alloc Count
5000/36000 MHz 512 MiB/16 GiB 600 MiB/12 GiB 2
...
Attributes
| job "example-core" { | |
| type = "batch" | |
| group "cache" { | |
| task "redis" { | |
| driver = "raw_exec" | |
| config { | |
| command = "/bin/bash" | |
| args = ["-c", "sleep 9000"] |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "log" | |
| "net/http" | |
| "net/http/httputil" | |
| "net/url" | |
| "os" |
Limited the memory used by the client by adding this to my server config:
client {
memory_total_mb = 2000
}Generated test jobs:
./generate.sh baz 10 1000 600
| acl { | |
| enabled = true | |
| } |
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "github.com/hashicorp/nomad/api" | |
| ) | |
| func main() { |
| # There can only be a single job definition per file. This job is named | |
| # "example" so it will create a job with the ID and Name "example". | |
| # The "job" block is the top-most configuration option in the job | |
| # specification. A job is a declarative specification of tasks that Nomad | |
| # should run. Jobs have a globally unique name, one or many task groups, which | |
| # are themselves collections of one or many tasks. | |
| # | |
| # For more information and examples on the "job" block, please see | |
| # the online documentation at: |
| package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "fmt" | |
| "log" | |
| "net" | |
| "strings" | |
| "time" |