]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: Warn if missing expected_num_objects 24395/head
authorDouglas Fuller <dfuller@redhat.com>
Fri, 29 Jun 2018 17:55:31 +0000 (13:55 -0400)
committerNathan Cutler <ncutler@suse.com>
Wed, 3 Oct 2018 12:17:35 +0000 (14:17 +0200)
When creating a pool on filestore, warn if the user appears to be
creating a pool to store a large number of objects but omitted the
expected_num_objects parameter. Create the pool anyway.

Fixes: http://tracker.ceph.com/issues/24687
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
(cherry picked from commit 69fb2293c4d38012e7c4781aaa39a47596125bbb)

src/mon/OSDMonitor.cc

index cb3654036aca4df3c7cf217f495eabfba28bab92..03f1b1ba0a4bba82d8f0ec27ec4e2a795cfe047f 100644 (file)
@@ -10874,6 +10874,17 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
       goto reply;
     }
 
+    if (expected_num_objects == 0 &&
+       cct->_conf->osd_objectstore == "filestore" &&
+       cct->_conf->filestore_merge_threshold < 0) {
+      int osds = osdmap.get_num_osds();
+      if (osds && (pg_num >= 1024 || pg_num / osds >= 100)) {
+        ss << "For better initial performance on pools expected to store a "
+          << "large number of objects, consider supplying the "
+          << "expected_num_objects parameter when creating the pool.\n";
+      }
+    }
+
     int64_t fast_read_param;
     cmd_getval(g_ceph_context, cmdmap, "fast_read", fast_read_param, int64_t(-1));
     FastReadType fast_read = FAST_READ_DEFAULT;