]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: remove all pg_num arguments to 'osd pool create'
authorSage Weil <sage@redhat.com>
Thu, 19 Sep 2019 15:47:07 +0000 (10:47 -0500)
committerSage Weil <sage@redhat.com>
Sun, 22 Sep 2019 21:58:33 +0000 (16:58 -0500)
Also, update the dicussion about pg_num and pool creation, with a reference
to the autoscaler.

Signed-off-by: Sage Weil <sage@redhat.com>
23 files changed:
doc/cephfs/createfs.rst
doc/cephfs/disaster-recovery-experts.rst
doc/cephfs/hadoop.rst
doc/dev/blkin.rst
doc/dev/corpus.rst
doc/dev/erasure-coded-pool.rst
doc/dev/osd_internals/erasure_coding/developer_notes.rst
doc/dev/quick_guide.rst
doc/man/8/ceph.rst
doc/rados/operations/control.rst
doc/rados/operations/erasure-code-clay.rst
doc/rados/operations/erasure-code-lrc.rst
doc/rados/operations/erasure-code-shec.rst
doc/rados/operations/erasure-code.rst
doc/rados/operations/placement-groups.rst
doc/rados/operations/pools.rst
doc/rados/troubleshooting/troubleshooting-pg.rst
doc/rbd/libvirt.rst
doc/rbd/rbd-kubernetes.rst
doc/rbd/rbd-openstack.rst
doc/start/kube-helm.rst
doc/start/quick-ceph-deploy.rst
doc/start/quick-cephfs.rst

index 0461673906713fd22d4705d61a03e4851415f2db..11c54a1cd3c13f8b596255fa00cefb86286e6431 100644 (file)
@@ -28,8 +28,8 @@ might run the following commands:
 
 .. code:: bash
 
-    $ ceph osd pool create cephfs_data <pg_num>
-    $ ceph osd pool create cephfs_metadata <pg_num>
+    $ ceph osd pool create cephfs_data
+    $ ceph osd pool create cephfs_metadata
 
 Generally, the metadata pool will have at most a few gigabytes of data. For
 this reason, a smaller PG count is usually recommended. 64 or 128 is commonly
index dad9f88ba2daf7aa028fcba9803f0c6df9a721e0..47c7bd9bfc05f41b34e9e2fdf754d64780d106ee 100644 (file)
@@ -219,7 +219,7 @@ it with empty file system data structures:
 ::
 
     ceph fs flag set enable_multiple true --yes-i-really-mean-it
-    ceph osd pool create recovery <pg-num> replicated <crush-rule-name>
+    ceph osd pool create recovery replicated <crush-rule-name>
     ceph fs new recovery-fs recovery <data pool> --allow-dangerous-metadata-overlay
     cephfs-data-scan init --force-init --filesystem recovery-fs --alternate-pool recovery
     ceph fs reset recovery-fs --yes-i-really-mean-it
index cfb291e1efdf079a35559f0b1c3bbb4df5c71f84..e2c0ffedc6337f2849c06449761a08da5b6571f4 100644 (file)
@@ -146,7 +146,7 @@ for storing file system data using the ``ceph fs add_data_pool`` command.
 First, create the pool. In this example we create the ``hadoop1`` pool with
 replication factor 1. ::
 
-    ceph osd pool create hadoop1 100
+    ceph osd pool create hadoop1
     ceph osd pool set hadoop1 size 1
 
 Next, determine the pool id. This can be done by examining the output of the
index 574ae8029dcdd5a6001343324bb6009687044b57..00a5748faaafb951710b19faa4996b343e7f9791 100644 (file)
@@ -111,7 +111,7 @@ You may want to check that ceph is up.::
 
 Now put something in using rados, check that it made it, get it back, and remove it.::
 
-  ./ceph osd pool create test-blkin 8
+  ./ceph osd pool create test-blkin
   ./rados put test-object-1 ./vstart.sh --pool=test-blkin
   ./rados -p test-blkin ls
   ./ceph osd map test-blkin test-object-1
index 879a819262ab939714278f9f4d4e5db3d2ffd9e0..c538028768b16ef885a35b66a5744ebf0c611968 100644 (file)
@@ -41,7 +41,7 @@ script of ``script/gen-corpus.sh``, or by following the instructions below:
 
 #. Use as much functionality of the cluster as you can, to exercise as many object encoder methods as possible::
 
-       bin/ceph osd pool create mypool 8
+       bin/ceph osd pool create mypool
        bin/rados -p mypool bench 10 write -b 123
        bin/ceph osd out 0
        bin/ceph osd in 0
index 670865baff05d4e8f7ec8efc2401dd10c4335334..8ad697702e99a470b98c489a4abec9c7db298532 100644 (file)
@@ -49,13 +49,12 @@ Interface
 
 Set up an erasure-coded pool::
 
- $ ceph osd pool create ecpool 12 12 erasure
+ $ ceph osd pool create ecpool erasure
 
 Set up an erasure-coded pool and the associated CRUSH rule ``ecrule``::
 
  $ ceph osd crush rule create-erasure ecrule
- $ ceph osd pool create ecpool 12 12 erasure \
-     default ecrule
+ $ ceph osd pool create ecpool erasure default ecrule
 
 Set the CRUSH failure domain to osd (instead of host, which is the default)::
 
@@ -67,7 +66,7 @@ Set the CRUSH failure domain to osd (instead of host, which is the default)::
  plugin=jerasure
  technique=reed_sol_van
  crush-failure-domain=osd
- $ ceph osd pool create ecpool 12 12 erasure myprofile
+ $ ceph osd pool create ecpool erasure myprofile
 
 Control the parameters of the erasure code plugin::
 
@@ -78,8 +77,7 @@ Control the parameters of the erasure code plugin::
  m=2
  plugin=jerasure
  technique=reed_sol_van
- $ ceph osd pool create ecpool 12 12 erasure \
-     myprofile
+ $ ceph osd pool create ecpool erasure myprofile
 
 Choose an alternate erasure code plugin::
 
index fca56ce25368a7b1a58e4669f707cef3716724f9..090dda194ab1c9772b854696cbbb3f996ae3ac2d 100644 (file)
@@ -174,7 +174,7 @@ key=value pairs stored in an `erasure code profile`_.
  plugin=jerasure
  technique=reed_sol_van
  crush-failure-domain=osd
- $ ceph osd pool create ecpool 12 12 erasure myprofile
+ $ ceph osd pool create ecpool erasure myprofile
 
 The *plugin* is dynamically loaded from *directory*  and expected to
 implement the *int __erasure_code_init(char *plugin_name, char *directory)* function 
index 7bda55f22c3489fdc10312507496fa3be7e52989..c2f02fe6bc6d47b11fc4734c1f3941beb29d6eb0 100644 (file)
@@ -66,7 +66,7 @@ Make a pool and run some benchmarks against it:
 
 .. code::
 
-       $ bin/ceph osd pool create mypool 8
+       $ bin/ceph osd pool create mypool
        $ bin/rados -p mypool bench 10 write -b 123
 
 Place a file into the new pool:
index fcb7c9cd20a2281210b08a5724f74d23c2bb8008..40e71304d5e8ac864c53a842487757d8c3b2b737 100644 (file)
@@ -943,7 +943,7 @@ Subcommand ``create`` creates pool.
 
 Usage::
 
-       ceph osd pool create <poolname> <int[0-]> {<int[0-]>} {replicated|erasure}
+       ceph osd pool create <poolname> {<int[0-]>} {<int[0-]>} {replicated|erasure}
        {<erasure_code_profile>} {<rule>} {<int>}
 
 Subcommand ``delete`` deletes pool.
index 72ebd350c389aad079d495f3b7326b7e317db8c7..68ea3c42f13cccf9562b6bd45d77aa58dd28273f 100644 (file)
@@ -253,7 +253,7 @@ Creates/deletes a snapshot of a pool. ::
 
 Creates/deletes/renames a storage pool. ::
 
-       ceph osd pool create {pool-name} pg_num [pgp_num]
+       ceph osd pool create {pool-name} [pg_num [pgp_num]]
        ceph osd pool delete {pool-name} [{pool-name} --yes-i-really-really-mean-it]
        ceph osd pool rename {old-name} {new-name}
 
index 70f4ffffc7662bff62d4eb9c37854cf349a7d2f0..e9cfa96e6a237550f263ba00b3f73457719f685b 100644 (file)
@@ -44,7 +44,7 @@ An example configuration that can be used to observe reduced bandwidth usage::
              plugin=clay \
              k=4 m=2 d=5 \
              crush-failure-domain=host
-        $ ceph osd pool create claypool 12 12 erasure CLAYprofile
+        $ ceph osd pool create claypool erasure CLAYprofile
 
 
 Creating a clay profile
index c2f24b3cbaff672835841b9014e6d1263bbea662..a144b92eacf3ce900ac26529a55cec7bc92a8706 100644 (file)
@@ -28,7 +28,7 @@ observed.::
              plugin=lrc \
              k=4 m=2 l=3 \
              crush-failure-domain=host
-        $ ceph osd pool create lrcpool 12 12 erasure LRCprofile
+        $ ceph osd pool create lrcpool erasure LRCprofile
 
 
 Reduce recovery bandwidth between racks
@@ -42,7 +42,7 @@ OSD is in the same rack as the lost chunk.::
              k=4 m=2 l=3 \
              crush-locality=rack \
              crush-failure-domain=host
-        $ ceph osd pool create lrcpool 12 12 erasure LRCprofile
+        $ ceph osd pool create lrcpool erasure LRCprofile
 
 
 Create an lrc profile
@@ -196,7 +196,7 @@ by default.::
              plugin=lrc \
              mapping=DD_ \
              layers='[ [ "DDc", "" ] ]'
-        $ ceph osd pool create lrcpool 12 12 erasure LRCprofile
+        $ ceph osd pool create lrcpool erasure LRCprofile
 
 Reduce recovery bandwidth between hosts
 ---------------------------------------
@@ -214,7 +214,7 @@ the layout of the chunks is different::
                        [ "cDDD____", "" ],
                        [ "____cDDD", "" ],
                      ]'
-        $ ceph osd pool create lrcpool 12 12 erasure LRCprofile
+        $ ceph osd pool create lrcpool erasure LRCprofile
 
 
 Reduce recovery bandwidth between racks
@@ -235,7 +235,7 @@ OSD is in the same rack as the lost chunk.::
                              [ "choose", "rack", 2 ],
                              [ "chooseleaf", "host", 4 ],
                             ]'
-        $ ceph osd pool create lrcpool 12 12 erasure LRCprofile
+        $ ceph osd pool create lrcpool erasure LRCprofile
 
 Testing with different Erasure Code backends
 --------------------------------------------
@@ -251,7 +251,7 @@ be used in the lrcpool.::
              plugin=lrc \
              mapping=DD_ \
              layers='[ [ "DDc", "plugin=isa technique=cauchy" ] ]'
-        $ ceph osd pool create lrcpool 12 12 erasure LRCprofile
+        $ ceph osd pool create lrcpool erasure LRCprofile
 
 You could also use a different erasure code profile for for each
 layer.::
@@ -264,7 +264,7 @@ layer.::
                        [ "cDDD____", "plugin=isa" ],
                        [ "____cDDD", "plugin=jerasure" ],
                      ]'
-        $ ceph osd pool create lrcpool 12 12 erasure LRCprofile
+        $ ceph osd pool create lrcpool erasure LRCprofile
 
 
 
index c799b3ae19f5ebcbff4fd5c1d41650506668831c..dd5708a3b928b313360634bf04ae87cd11890030 100644 (file)
@@ -141,4 +141,4 @@ Erasure code profile examples
              plugin=shec \
              k=8 m=4 c=3 \
              crush-failure-domain=host
-        $ ceph osd pool create shecpool 256 256 erasure SHECprofile
+        $ ceph osd pool create shecpool erasure SHECprofile
index 9fe83a3f117da51b0b2ea92c63d05e3d5904d486..23e23bb8f9a640aaba7f38675e8ab71b0387b26d 100644 (file)
@@ -18,7 +18,7 @@ The simplest erasure coded pool is equivalent to `RAID5
 <https://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_5>`_ and
 requires at least three hosts::
 
-    $ ceph osd pool create ecpool 12 12 erasure
+    $ ceph osd pool create ecpool erasure
     pool 'ecpool' created
     $ echo ABCDEFGHI | rados --pool ecpool put NYAN -
     $ rados --pool ecpool get NYAN -
@@ -56,7 +56,7 @@ the following profile can be defined::
        k=3 \
        m=2 \
        crush-failure-domain=rack
-    $ ceph osd pool create ecpool 12 12 erasure myprofile
+    $ ceph osd pool create ecpool erasure myprofile
     $ echo ABCDEFGHI | rados --pool ecpool put NYAN -
     $ rados --pool ecpool get NYAN -
     ABCDEFGHI
index d5cc267c27d1b36de33021acf4e2afae8b9764c5..9a417117f9c63764c70fc6f20d433209a52f0c35 100644 (file)
@@ -167,27 +167,28 @@ A preselection of pg_num
 
 When creating a new pool with::
 
-        ceph osd pool create {pool-name} pg_num
+        ceph osd pool create {pool-name} [pg_num]
 
-it is mandatory to choose the value of ``pg_num`` because it cannot (currently) be
-calculated automatically. Here are a few values commonly used:
+it is optional to choose the value of ``pg_num``.  If you do not
+specify ``pg_num``, the cluster can (by default) automatically tune it
+for you based on how much data is stored in the pool (see above, :ref:`pg-autoscaler`).
 
-- Less than 5 OSDs set ``pg_num`` to 128
+Alternatively, ``pg_num`` can be explicitly provided.  However,
+whether you specify a ``pg_num`` value or not does not affect whether
+the value is automatically tuned by the cluster after the fact.  To
+enable or disable auto-tuning,::
 
-- Between 5 and 10 OSDs set ``pg_num`` to 512
+  ceph osd pool set {pool-name} pg_autoscaler_mode (on|off|warn)
 
-- Between 10 and 50 OSDs set ``pg_num`` to 1024
+The "rule of thumb" for PGs per OSD has traditionally be 100.  With
+the additional of the balancer (which is also enabled by default), a
+value of more like 50 PGs per OSD is probably reasonable.  The
+challenge (which the autoscaler normally does for you), is to:
 
-- If you have more than 50 OSDs, you need to understand the tradeoffs
-  and how to calculate the ``pg_num`` value by yourself
-
-- For calculating ``pg_num`` value by yourself please take help of `pgcalc`_ tool
-
-As the number of OSDs increases, choosing the right value for pg_num
-becomes more important because it has a significant influence on the
-behavior of the cluster as well as the durability of the data when
-something goes wrong (i.e. the probability that a catastrophic event
-leads to data loss).
+- have the PGs per pool proportional to the data in the pool, and
+- end up with 50-100 PGs per OSDs, after the replication or
+  erasuring-coding fan-out of each PG across OSDs is taken into
+  consideration
 
 How are Placement Groups used ?
 ===============================
index 18fdd3ee11eedc21d66c996697520c62544f6ce4..8aa6f378b69c351219830c3ef1e26ab4446dc0f7 100644 (file)
@@ -58,9 +58,9 @@ For example::
 
 To create a pool, execute::
 
-       ceph osd pool create {pool-name} {pg-num} [{pgp-num}] [replicated] \
+       ceph osd pool create {pool-name} [{pg-num} [{pgp-num}]] [replicated] \
              [crush-rule-name] [expected-num-objects]
-       ceph osd pool create {pool-name} {pg-num}  {pgp-num}   erasure \
+       ceph osd pool create {pool-name} [{pg-num} [{pgp-num}]]   erasure \
              [erasure-code-profile] [crush-rule-name] [expected_num_objects]
 
 Where:
index a11b972f50fd20877af29c8eb0676fa035987c1c..7aa3846c1cec542ed320b69e40621e6a75fdb1da 100644 (file)
@@ -476,7 +476,7 @@ If the Ceph cluster only has 8 OSDs and the erasure coded pool needs
 coded pool that requires less OSDs::
 
      ceph osd erasure-code-profile set myprofile k=5 m=3
-     ceph osd pool create erasurepool 16 16 erasure myprofile
+     ceph osd pool create erasurepool erasure myprofile
 
 or add a new OSDs and the PG will automatically use them.
 
@@ -515,7 +515,7 @@ You can resolve the problem by creating a new pool in which PGs are allowed
 to have OSDs residing on the same host with::
 
      ceph osd erasure-code-profile set myprofile crush-failure-domain=osd
-     ceph osd pool create erasurepool 16 16 erasure myprofile
+     ceph osd pool create erasurepool erasure myprofile
 
 CRUSH gives up too soon
 -----------------------
index f953b1f08e2303629a698b27908b8606f57c71af..694179df5137ffe216b75234d92603035a801bb0 100644 (file)
@@ -59,9 +59,9 @@ Configuring Ceph
 To configure Ceph for use with ``libvirt``, perform the following steps:
 
 #. `Create a pool`_. The following example uses the 
-   pool name ``libvirt-pool`` with 128 placement groups. ::
+   pool name ``libvirt-pool``.::
 
-       ceph osd pool create libvirt-pool 128 128
+       ceph osd pool create libvirt-pool
 
    Verify the pool exists. :: 
 
index c83f6851c60af92af6e714de24d405dc6f66145c..04466b0acf7e50df7ed6728a197ffce548a4f47f 100644 (file)
@@ -44,7 +44,7 @@ By default, Ceph block devices use the ``rbd`` pool. Create a pool for
 Kubernetes volume storage. Ensure your Ceph cluster is running, then create
 the pool. ::
 
-        $ ceph osd pool create kubernetes 128
+        $ ceph osd pool create kubernetes
 
 See `Create a Pool`_ for details on specifying the number of placement groups
 for your pools, and `Placement Groups`_ for details on the number of placement
index 929d4c92616f6afbaccfca58ae9bfa6fcfdc7603..75aefbb05979491fcd0f89741dc74f2249ffae70 100644 (file)
@@ -77,10 +77,10 @@ By default, Ceph block devices use the ``rbd`` pool. You may use any available
 pool. We recommend creating a pool for Cinder and a pool for Glance. Ensure
 your Ceph cluster is running, then create the pools. ::
 
-    ceph osd pool create volumes 128
-    ceph osd pool create images 128
-    ceph osd pool create backups 128
-    ceph osd pool create vms 128
+    ceph osd pool create volumes
+    ceph osd pool create images
+    ceph osd pool create backups
+    ceph osd pool create vms
 
 See `Create a Pool`_ for detail on specifying the number of placement groups for
 your pools, and `Placement Groups`_ for details on the number of placement
index e50f0d4d6a70715b029c982ab58d9a06178b51b2..ff5b9902ec1c9c03dad54fca49a59a40439e0196 100644 (file)
@@ -255,7 +255,7 @@ Copy the user secret from the ``ceph`` namespace to ``default``::
 
 Create and initialize the RBD pool::
 
-    $ kubectl -n ceph exec -ti ceph-mon-cppdk -c ceph-mon -- ceph osd pool create rbd 256
+    $ kubectl -n ceph exec -ti ceph-mon-cppdk -c ceph-mon -- ceph osd pool create rbd
     pool 'rbd' created
     $ kubectl -n ceph exec -ti ceph-mon-cppdk -c ceph-mon -- rbd pool init rbd
 
index 40a1747271561eb3fc7dda77318e2929d3d6655f..84b0998c00ffc11bbfbaf361628bfbf826a06a81 100644 (file)
@@ -299,7 +299,7 @@ example::
    ``rados put`` command on the command line. For example::
 
      echo {Test-data} > testfile.txt
-     ceph osd pool create mytest 8
+     ceph osd pool create mytest
      rados put {object-name} {file-path} --pool=mytest
      rados put test-object-1 testfile.txt --pool=mytest
 
index 5e74679dbb17101e0ef3980ca748cb68d9cef821..da98f9465cde58e9f53cf42d336ad1e1861a2061 100644 (file)
@@ -36,8 +36,8 @@ become active until you create some pools and a file system.  See :doc:`/cephfs/
 
 ::
 
-    ceph osd pool create cephfs_data <pg_num>
-    ceph osd pool create cephfs_metadata <pg_num>
+    ceph osd pool create cephfs_data
+    ceph osd pool create cephfs_metadata
     ceph fs new <fs_name> cephfs_metadata cephfs_data