summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@inktank.com>2013-03-06 17:42:03 -0800
committerJosh Durgin <josh.durgin@inktank.com>2013-03-06 17:47:28 -0800
commit7c208d2f8e3f28f4055a4ae51eceae892dcef1dc (patch)
tree497c5f9a83b845f88f765cb8ff70b682df0674ab
parentcb3ee33532fb60665f39f6ccb1d69d67279fd5e1 (diff)
downloadceph-7c208d2f8e3f28f4055a4ae51eceae892dcef1dc.tar.gz
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 <josh.durgin@inktank.com>
-rw-r--r--src/common/common_init.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/common_init.cc b/src/common/common_init.cc
index 3f7d501eb26..ef8cf010072 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);
}
}
-