build(deps-dev): apply updates
[poolifier.git] / docs / worker-choice-strategies.md
index 296d8c3b1cc7370058577d654d44625d9d3cfe13..36d6cf70f6493b8f7fa7ad742dffa185b2bd190d 100644 (file)
@@ -7,7 +7,7 @@ All duration or timestamp are expressed in milliseconds.
 - [Strategies](#strategies)
   - [Fair share](#fair-share)
   - [Weighted round robin](#weighted-round-robin)
-  - [Interleaved weighted round robin](#interleaved-weighted-round-robin)
+  - [Interleaved weighted round robin (experimental)](#interleaved-weighted-round-robin-experimental)
 - [Statistics](#statistics)
   - [Simple moving median](#simple-moving-median)
 
@@ -20,13 +20,13 @@ By default, the strategy uses the simple moving average task execution time for
 
 ### Weighted round robin
 
-The worker weights are maximum tasks execution time, once the worker has reached its maximum tasks execution time, the next task is assigned to the next worker. The worker default weights are the same for all workers and is computed given the CPU cores speed and theirs numbers.
+The worker weights are maximum tasks execution time. Once the worker has reached its maximum tasks execution time, the next task is assigned to the next worker. The default worker weight is the same for each and computed given the CPU cores speed and theirs numbers.
 
-### Interleaved weighted round robin
+### Interleaved weighted round robin (experimental)
 
-The worker weights are maximum tasks execution time. The rounds are the deduplicated worker weights.  
-During a round, if worker weight is inferior to the current round, the next task is assigned to the next worker. Once all workers have been assigned a task, the next round starts.  
-The worker default weights are the same for all workers and is computed given the CPU cores speed and theirs numbers. So the default rounds consists of a unique worker weight.
+The worker weights are maximum tasks execution time. The rounds are the deduplicated worker weights in ascending order.  
+During a round, if the worker weight is superior or equal to the current round weight and its tasks execution time is inferior to the current round weight, the task is assigned to the worker. Once all workers weight have been tested, the next round starts.  
+The default worker weights is the same for each and computed given the CPU cores speed and theirs numbers. So the default 'rounds' consists of a unique worker weight.
 
 ## Statistics
 
@@ -34,4 +34,4 @@ Worker choice strategies enable only the statistics that are needed to choose th
 
 ### Simple moving median
 
-Strategies using the average task execution time for each worker can use the simple moving median instead. Simple moving median is more robust to outliers and can be used to avoid assigning tasks to workers that are currently overloaded. Simple moving median usage introduces a small overhead: measurement history must be kept for each worker and the simple moving median must be recomputed each time a task has finished.
+Strategies using the simple moving average task execution time for each worker can use the simple moving median instead. Simple moving median is more robust to outliers and can be used to avoid assigning tasks to workers that are currently overloaded.