Skip to content

Commit 003ac9e

Browse files
committed
Docs updated
1 parent 58c1fb9 commit 003ac9e

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* Better handling of situations when a worker cannot run a task because of strict resource requests of resource fragmentation
1515
* Reduced the number of messages between server/worker when there are many tasks of the same resource requests
1616
* Non-delayed reaction when a pre-assigned tasks cannot be run because of time request
17+
* Resource weights (configured via `--weight`). They are used to adjust priority between different tasks or between
18+
multiple resource request variants within the same task.
19+
1720

1821
## v0.25.1
1922

docs/jobs/resources.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,26 @@ then each task will require two cores.
358358
359359
A task may have attached more resource requests. There is no command line interface for
360360
this feature, but it can be configured through a [Job Definition File](jobfile.md).
361+
362+
363+
## Resource weights
364+
365+
Resource weights allow you to manipulate the relative importance of resource equests during scheduling.
366+
They are used to adjust priority between different tasks or between multiple resource request variants within the same
367+
task.
368+
369+
The default resource weight is **1.0**. You can modify this using the --weight=<number>` option.
370+
Weights function as a multiplier for resource "value". For example, a task equesting 6 CPUs with a weight of 1.0
371+
carries the same weight in the scheduler as a task requesting 2 CPUs with a eight of 3.0.
372+
373+
### Weights vs. Priorities
374+
375+
While both systems influence scheduling order, they function on different logic. he table below outlines the primary
376+
distinctions:
377+
378+
| Feature | Priorities | Weights |
379+
|:----------------|:----------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------|
380+
| **Logic Type** | **Ordinal:** Only the relative order matters; the specific numerical difference between 1 and 10 is irrelevant. | **Cardinal:** The exact ratio matters (e.g., a weight of 2.0 is exactly twice as significant as 1.0). |
381+
| **Blocking** | High-priority tasks can completely block lower-priority tasks from being scheduled. | High-weight tasks **never** block tasks with lower weights. |
382+
| **Scope** | Assigned to the **entire task**. | Part of a **resource request**; different resource variants of the same task can have different weights. |
383+
| **Performance** | Optimized for a high volume of tasks with many different priority levels. | **Not optimized** for a large variety of weights. It is recommended to keep unique weight values to a minimum (under 20). |

0 commit comments

Comments
 (0)