7 Commits

Author SHA1 Message Date
Martijn Vegter
736103aa54 client: fix JSON formatted logs when failing to reserve cores (#25523)
Fixed a bug where JSON formatted logs would not show the requested and overlapping 
cores when failing to reserve cores
2025-03-27 08:52:32 -04:00
Martijn Vegter
997da25cdb scheduler: take all assigned cpu cores into account instead of only those part of the largest lifecycle (#24304)
Fixes a bug in the AllocatedResources.Comparable method, where the scheduler
would only take into account the cpusets of the tasks in the largest lifecycle.
This could result in overlapping cgroup cpusets. Now we make the distinction
between reserved and fungible resources throughout the lifespan of the alloc.
In addition, added logging in case of future regressions thus not requiring
manual inspection of cgroup files.
2024-11-21 13:21:48 -05:00
Juana De La Cuesta
9c5f962940 Update client/lib/cgroupslib/partition_linux.go
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-09-06 10:56:47 +02:00
Juana De La Cuesta
426c225dc2 Update client/lib/cgroupslib/partition_linux.go
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-09-06 10:56:41 +02:00
Juana De La Cuesta
8e6d85b66f Update client/lib/cgroupslib/partition_linux.go
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-09-06 10:56:36 +02:00
Juanadelacuesta
a65d05ff51 fix: keep a register of the usable cores to avoid using more than that 2024-09-05 17:02:54 +02:00
Seth Hoenig
2e1974a574 client: refactor cpuset partitioning (#18371)
* client: refactor cpuset partitioning

This PR updates the way Nomad client manages the split between tasks
that make use of resources.cpus vs. resources.cores.

Previously, each task was explicitly assigned which CPU cores they were
able to run on. Every time a task was started or destroyed, all other
tasks' cpusets would need to be updated. This was inefficient and would
crush the Linux kernel when a client would try to run ~400 or so tasks.

Now, we make use of cgroup heirarchy and cpuset inheritence to efficiently
manage cpusets.

* cr: tweaks for feedback
2023-09-12 09:11:11 -05:00