[ci skip] Add scheduler tuning guide.
@@ -176,6 +176,20 @@ This way, `topolvm-scheduler` is exposed by LoadBalancer service.
Then edit `urlPrefix` in [./scheduler-config/scheduler-policy.cfg](./scheduler-config/scheduler-policy.cfg) to specify the LoadBalancer address.
+### Scoring tuning
+
+The prioritize of Pod scheduling by `topolvm-scheduler` can be tuned via the following two ways:
+1. Adjust the divisor parameter in the scoring expression
+2. Change the weight for the scoring by `topolvm-scheduler` against the default by kube-scheduler
+
+The scoring expression in `topolvm-scheduler` is as follows:
+```
+min(10, max(0, log2(capacity >> 30 / divisor)))
+```
+For example, the default of `divisor` is `1`, then if a node has the free disk capacity more than `1024GiB`, `topolvm-scheduler` scores the node as `10`. `divisor` should be adjusted to suit each environment. It can be passed as the command line parameter of `topolvm-scheduler`.
+
+Besides, the scoring weight can be passed to kube-scheduler via [scheduler-policy.cfg](./scheduler-config/scheduler-policy.cfg). Almost all scoring algorithms in kube-scheduler are weighted as `1`. So if you want to give a priority to the scoring by `topolvm-scheduler`, you have to set the weight as a value larger than one.
+
Protect system namespaces from TopoLVM webhook
---------------------------------------------
