]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "ceph_osd: remove client message cap limit" 35737/head
authorJosh Durgin <jdurgin@redhat.com>
Sat, 25 Jan 2020 00:36:56 +0000 (19:36 -0500)
committerNeha Ojha <nojha@redhat.com>
Wed, 24 Jun 2020 01:28:24 +0000 (01:28 +0000)
This reverts commit 45d5ac3ea040d6a7213b63d1c582e3a1bbaae8d4.

Without a msg throttler, we can't change osd_client_message_cap cap.
The throttler is designed to work with 0 as a max, so change the
default to 0 to disable it by default instead.

This doesn't affect the default behavior, it only lets us use this
option again.

Fixes: https://tracker.ceph.com/issues/46143
Conflicts:
src/ceph_osd.cc - new style of gconf() access

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 9087e3b751a78211011b39377394ceb297078f76)

src/ceph_osd.cc
src/common/options.cc

index afa945dd00deaba684ccda3f5042812035fc14a8..a2b36769bfd02243c419e80cfba68dfa54f4ef17 100644 (file)
@@ -573,6 +573,9 @@ flushjournal_out:
     g_conf().get_val<Option::size_t>("osd_client_message_size_cap");
   boost::scoped_ptr<Throttle> client_byte_throttler(
     new Throttle(g_ceph_context, "osd_client_bytes", message_size));
+  uint64_t message_cap = g_conf().get_val<uint64_t>("osd_client_message_cap");
+  boost::scoped_ptr<Throttle> client_msg_throttler(
+    new Throttle(g_ceph_context, "osd_client_messages", message_cap));
 
   // All feature bits 0 - 34 should be present from dumpling v0.67 forward
   uint64_t osd_required =
@@ -583,7 +586,7 @@ flushjournal_out:
   ms_public->set_default_policy(Messenger::Policy::stateless_registered_server(0));
   ms_public->set_policy_throttlers(entity_name_t::TYPE_CLIENT,
                                   client_byte_throttler.get(),
-                                  nullptr);
+                                  client_msg_throttler.get());
   ms_public->set_policy(entity_name_t::TYPE_MON,
                         Messenger::Policy::lossy_client(osd_required));
   ms_public->set_policy(entity_name_t::TYPE_MGR,
@@ -752,6 +755,7 @@ flushjournal_out:
   delete ms_objecter;
 
   client_byte_throttler.reset();
+  client_msg_throttler.reset();
 
   // cd on exit, so that gmon.out (if any) goes into a separate directory for each node.
   char s[20];
index b9d5b675a0a3e43e025a5d70d8018f4fd52b4ff6..166bad8b1bd0dc46f1a34880f5f8295a6da2273f 100644 (file)
@@ -2511,7 +2511,7 @@ std::vector<Option> get_global_options() {
     .set_long_description("If this value is exceeded, the OSD will not read any new client data off of the network until memory is freed."),
 
     Option("osd_client_message_cap", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
-    .set_default(100)
+    .set_default(0)
     .set_description("maximum number of in-flight client requests"),
 
     Option("osd_crush_update_weight_set", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)