From 1bc77d65afd9d9e6b817d90fddd311d37ac2b881 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 14 Jul 2017 18:14:31 -0400 Subject: [PATCH] doc/rados/operations/crush-map: document weight set commands Signed-off-by: Sage Weil --- doc/rados/operations/crush-map.rst | 66 ++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/doc/rados/operations/crush-map.rst b/doc/rados/operations/crush-map.rst index fa4f86e15cab3..c5be2a30cf48f 100644 --- a/doc/rados/operations/crush-map.rst +++ b/doc/rados/operations/crush-map.rst @@ -247,6 +247,11 @@ the hierarchy is visible as a separate column (labeled either ceph osd crush tree +When both *compat* and *per-pool* weight sets are in use, data +placement for a particular pool will use its own per-pool weight set +if present. If not, it will use the compat weight set if present. If +neither are present, it will use the normal CRUSH weights. + Although weight sets can be set up and manipulated by hand, it is recommended that the *balancer* module be enabled to do so automatically. @@ -443,6 +448,67 @@ The following example removes the ``rack12`` bucket from the hierarchy:: ceph osd crush remove rack12 +Creating a compat weight set +---------------------------- + +.. note: This step is normally done automatically by the ``balancer`` + module when enabled. + +To create a *compat* weight set:: + + ceph osd crush weight-set create-compat + +Weights for the compat weight set can be adjusted with:: + + ceph osd crush weight-set reweight-compat {name} {weight} + +The compat weight set can be destroyed with:: + + ceph osd crush weight-set rm-compat + +Creating per-pool weight sets +----------------------------- + +To create a weight set for a specific pool,:: + + ceph osd crush weight-set create {pool-name} {mode} + +.. note:: Per-pool weight sets require that all servers and daemons + run Luminous v12.2.z or later. + +Where: + +``pool-name`` + +:Description: The name of a RADOS pool +:Type: String +:Required: Yes +:Example: ``rbd`` + +``mode`` + +:Description: Either ``flat`` or ``positional``. A *flat* weight set + has a single weight for each device or bucket. A + *positional* weight set has a potentially different + weight for each position in the resulting placement + mapping. For example, if a pool has a replica count of + 3, then a positional weight set will have three weights + for each device and bucket. +:Type: String +:Required: Yes +:Example: ``flat`` + +To adjust the weight of an item in a weight set:: + + ceph osd crush weight-set reweight {pool-name} {item-name} {weight [...]} + +To list existing weight sets,:: + + ceph osd crush weight-set ls + +To remove a weight set,:: + + ceph osd crush weight-set rm {pool-name} Tunables -- 2.39.5