]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: reduce default in-memory logs for non-daemons
authorJosh Durgin <josh.durgin@inktank.com>
Thu, 7 Mar 2013 01:42:03 +0000 (17:42 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 11 Mar 2013 18:01:51 +0000 (11:01 -0700)
The default of 100000 can result in hundreds of MBs of extra memory
used. This was most obvious when using librbd with caching enabled,
since there was a dout(0) accidentally left in the ObjectCacher.

refs: #4352
backport: bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 7c208d2f8e3f28f4055a4ae51eceae892dcef1dc)

src/common/common_init.cc

index 3f7d501eb260250f4203537413130e5eabcd01a0..ef8cf0100724d5b71a58f0df76dcc616ed3caba7 100644 (file)
@@ -79,6 +79,8 @@ CephContext *common_preinit(const CephInitParameters &iparams,
     conf->set_val_or_die("pid_file", "");
     conf->set_val_or_die("admin_socket", "");
     conf->set_val_or_die("log_file", "");
+    // use less memory for logs
+    conf->set_val_or_die("log_max_recent", "500");
   }
 
   return cct;
@@ -118,4 +120,3 @@ void common_init_finish(CephContext *cct)
     lockdep_register_ceph_context(cct);
   }
 }
-