[arvados] updated: 2.6.0-277-g52a5451c0
git repository hosting
git at public.arvados.org
Fri Jun 16 14:00:57 UTC 2023
Summary of changes:
lib/dispatchcloud/scheduler/run_queue.go | 4 ++--
lib/dispatchcloud/scheduler/scheduler.go | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
via 52a5451c01fda74c567fa43ba4af23688a398410 (commit)
from 69148e44f11b50f1c4b1c1bc4c1871ab10c3e893 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 52a5451c01fda74c567fa43ba4af23688a398410
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Fri Jun 16 10:00:25 2023 -0400
20601: Rename Scheduler.maxSupervisors -> Scheduler.supervisorFraction
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/lib/dispatchcloud/scheduler/run_queue.go b/lib/dispatchcloud/scheduler/run_queue.go
index e385e758f..63ac4a7b3 100644
--- a/lib/dispatchcloud/scheduler/run_queue.go
+++ b/lib/dispatchcloud/scheduler/run_queue.go
@@ -94,8 +94,8 @@ func (sch *Scheduler) runQueue() {
}
sch.mMaxContainerConcurrency.Set(float64(sch.maxConcurrency))
- maxSupervisors := int(float64(sch.maxConcurrency) * sch.maxSupervisors)
- if maxSupervisors < 1 && sch.maxSupervisors > 0 && sch.maxConcurrency > 0 {
+ maxSupervisors := int(float64(sch.maxConcurrency) * sch.supervisorFraction)
+ if maxSupervisors < 1 && sch.supervisorFraction > 0 && sch.maxConcurrency > 0 {
maxSupervisors = 1
}
diff --git a/lib/dispatchcloud/scheduler/scheduler.go b/lib/dispatchcloud/scheduler/scheduler.go
index 70b352d64..b1f8ea222 100644
--- a/lib/dispatchcloud/scheduler/scheduler.go
+++ b/lib/dispatchcloud/scheduler/scheduler.go
@@ -46,10 +46,10 @@ type Scheduler struct {
stop chan struct{}
stopped chan struct{}
- last503time time.Time // last time API responded 503
- maxConcurrency int // dynamic container limit (0 = unlimited), see runQueue()
- maxSupervisors float64 // maximum fraction of "supervisor" containers (these are containers who's main job is to launch other containers, e.g. workflow runners)
- maxInstances int // maximum number of instances the pool will bring up (0 = unlimited)
+ last503time time.Time // last time API responded 503
+ maxConcurrency int // dynamic container limit (0 = unlimited), see runQueue()
+ supervisorFraction float64 // maximum fraction of "supervisor" containers (these are containers who's main job is to launch other containers, e.g. workflow runners)
+ maxInstances int // maximum number of instances the pool will bring up (0 = unlimited)
mContainersAllocatedNotStarted prometheus.Gauge
mContainersNotAllocatedOverQuota prometheus.Gauge
@@ -62,7 +62,7 @@ type Scheduler struct {
//
// Any given queue and pool should not be used by more than one
// scheduler at a time.
-func New(ctx context.Context, client *arvados.Client, queue ContainerQueue, pool WorkerPool, reg *prometheus.Registry, staleLockTimeout, queueUpdateInterval time.Duration, maxInstances int, maxSupervisors float64) *Scheduler {
+func New(ctx context.Context, client *arvados.Client, queue ContainerQueue, pool WorkerPool, reg *prometheus.Registry, staleLockTimeout, queueUpdateInterval time.Duration, maxInstances int, supervisorFraction float64) *Scheduler {
sch := &Scheduler{
logger: ctxlog.FromContext(ctx),
client: client,
@@ -76,7 +76,7 @@ func New(ctx context.Context, client *arvados.Client, queue ContainerQueue, pool
stopped: make(chan struct{}),
uuidOp: map[string]string{},
maxConcurrency: maxInstances, // initial value -- will be dynamically adjusted
- maxSupervisors: maxSupervisors,
+ supervisorFraction: supervisorFraction,
maxInstances: maxInstances,
}
sch.registerMetrics(reg)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list