From: Josh Durgin Date: Thu, 7 Mar 2013 01:42:03 +0000 (-0800) Subject: common: reduce default in-memory logs for non-daemons X-Git-Tag: v0.56.4~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6838b8db9a3d4ceaf121a261e2ded4af9bfeaeb9;p=ceph.git common: reduce default in-memory logs for non-daemons 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 (cherry picked from commit 7c208d2f8e3f28f4055a4ae51eceae892dcef1dc) --- diff --git a/src/common/common_init.cc b/src/common/common_init.cc index 3f7d501eb260..ef8cf0100724 100644 --- a/src/common/common_init.cc +++ b/src/common/common_init.cc @@ -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); } } -