]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/pg_autoscaler: default to pg_num[_min] = 16 32069/head
authorSage Weil <sage@redhat.com>
Thu, 14 Nov 2019 15:37:44 +0000 (09:37 -0600)
committerNathan Cutler <ncutler@suse.com>
Fri, 6 Dec 2019 13:14:38 +0000 (14:14 +0100)
4 or 8 PGs doesn't provide much parallelism at baseline.  Start with 16
and set the floor there; that's a more reasonable number of OSDs that
will be put to work on a single pool.

Note that there is no magic number here.  At some point someone has to
tell Ceph if an empty pool should get lots of PGs across lots of devices
to get the full throughput of the cluster.  But this will be a bit less
painful/surprising for users.

Fixes: https://tracker.ceph.com/issues/42509
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 78bf92448002eece7501da01b67f900a84207e70)

doc/rados/configuration/pool-pg-config-ref.rst
src/common/options.cc
src/pybind/mgr/pg_autoscaler/module.py

index aaead074672ccf1c8a01258d49cac59ad472702f..d006f540b713d2927574a975a726fb0487d154f8 100644 (file)
@@ -207,7 +207,7 @@ Ceph configuration file.
               value is the same as ``pg_num`` with ``mkpool``.
 
 :Type: 32-bit Integer
-:Default: ``8``
+:Default: ``16``
 
 
 ``osd pool default pgp num``
index cc10924dc51163db73d29d1bd35aba8bd4a1d03c..1a2c8870c94fa9efbd6d19e542507625c848cbbf 100644 (file)
@@ -2565,7 +2565,7 @@ std::vector<Option> get_global_options() {
     .add_service("mon"),
 
     Option("osd_pool_default_pg_num", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
-    .set_default(8)
+    .set_default(16)
     .set_description("number of PGs for new pools")
     .set_flag(Option::FLAG_RUNTIME)
     .add_service("mon"),
index 72fd6b31ef93dd854486cdec41d30e150e3eec5a..bc7f85c74b54019b5aaeb3385169a02520f374ea 100644 (file)
@@ -25,7 +25,7 @@ Some terminology is made up for the purposes of this module:
 
 INTERVAL = 5
 
-PG_NUM_MIN = 4  # unless specified on a per-pool basis
+PG_NUM_MIN = 16  # unless specified on a per-pool basis
 
 def nearest_power_of_two(n):
     v = int(n)