]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: set straw_calc_version=1 for default+optimal; do not touch for presets
authorSage Weil <sage@redhat.com>
Fri, 5 Dec 2014 23:55:24 +0000 (15:55 -0800)
committerSage Weil <sage@redhat.com>
Fri, 13 Feb 2015 16:31:44 +0000 (08:31 -0800)
When using the presets for compatibility (i.e., based on version), do not
touch the straw behavior, as it does not affect mapping or compatibility.
However, make a point of setting it by default and for optimal.

For most users, this means that they will not see any change unless they
explicitly enable the new behavior, or switch to default or optimal
tunables.  The idea is that if they touched it, they shouldn't be
too surprised by the subsequent data movement.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit dd7b58f3b1aa1febfc6dc227937df93ee6e284eb)

(Note: differs from original in that the hammer tunable profile is not
present)

src/crush/CrushWrapper.h

index efe9dbb65ba072b2ff662209ae836ceb2b755884..b238d7b54f410309ba61587bf6413b44964b77a4 100644 (file)
@@ -108,7 +108,6 @@ public:
     crush->choose_total_tries = 19;
     crush->chooseleaf_descend_once = 0;
     crush->chooseleaf_vary_r = 0;
-    crush->straw_calc_version = 0;
   }
   void set_tunables_bobtail() {
     crush->choose_local_tries = 0;
@@ -116,7 +115,6 @@ public:
     crush->choose_total_tries = 50;
     crush->chooseleaf_descend_once = 1;
     crush->chooseleaf_vary_r = 0;
-    crush->straw_calc_version = 0;
   }
   void set_tunables_firefly() {
     crush->choose_local_tries = 0;
@@ -124,19 +122,17 @@ public:
     crush->choose_total_tries = 50;
     crush->chooseleaf_descend_once = 1;
     crush->chooseleaf_vary_r = 1;
-    crush->straw_calc_version = 0;
   }
 
   void set_tunables_legacy() {
     set_tunables_argonaut();
+    crush->straw_calc_version = 0;
   }
   void set_tunables_optimal() {
     set_tunables_firefly();
+    crush->straw_calc_version = 1;
   }
   void set_tunables_default() {
-    // default to bobtail tunables for the bits that affect
-    // compatibility, but default to the latest straw_calc_version
-    // because that does not.
     set_tunables_bobtail();
     crush->straw_calc_version = 1;
   }