diff --git a/documentation/en/default-lotus-miner-config.toml b/documentation/en/default-lotus-miner-config.toml index ef3b23b5c..ab9924c02 100644 --- a/documentation/en/default-lotus-miner-config.toml +++ b/documentation/en/default-lotus-miner-config.toml @@ -534,6 +534,14 @@ # env var: LOTUS_STORAGE_ALLOWREGENSECTORKEY #AllowRegenSectorKey = true + # Assigner specifies the worker assigner to use when scheduling tasks. + # "utilization" (default) - assign tasks to workers with lowest utilization. + # "spread" - assign tasks to as many distinct workers as possible. + # + # type: string + # env var: LOTUS_STORAGE_ASSIGNER + #Assigner = "utilization" + # ResourceFiltering instructs the system which resource filtering strategy # to use when evaluating tasks against this worker. An empty value defaults # to "hardware". diff --git a/extern/sector-storage/sched_assigner_spread.go b/extern/sector-storage/sched_assigner_spread.go index 2623c9c06..72a389993 100644 --- a/extern/sector-storage/sched_assigner_spread.go +++ b/extern/sector-storage/sched_assigner_spread.go @@ -60,7 +60,7 @@ func SpreadWS(sh *Scheduler, queueLen int, acceptableWindows [][]int, windows [] "worker", bestWid, "assigned", bestAssigned) - workerAssigned[bestWid] += 1 + workerAssigned[bestWid]++ windows[selectedWindow].Todo = append(windows[selectedWindow].Todo, task) rmQueue = append(rmQueue, sqi) diff --git a/node/config/doc_gen.go b/node/config/doc_gen.go index 757d80932..a9c7ed8f2 100644 --- a/node/config/doc_gen.go +++ b/node/config/doc_gen.go @@ -756,6 +756,14 @@ This parameter is ONLY applicable if the retrieval pricing policy strategy has b Comment: ``, }, + { + Name: "Assigner", + Type: "string", + + Comment: `Assigner specifies the worker assigner to use when scheduling tasks. +"utilization" (default) - assign tasks to workers with lowest utilization. +"spread" - assign tasks to as many distinct workers as possible.`, + }, { Name: "ResourceFiltering", Type: "sectorstorage.ResourceFilteringStrategy",