From 66607ebc0e451d239b7b15a8794cfd7bec992e6c Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Tue, 5 Jan 2016 08:49:44 -0800 Subject: [PATCH] logd: document ro.logd.size Bad comment advise in LogBuffer.cpp results in partners failing to considering using ro.logd.size to set the platform buffer size default. NB: It is not good practice to increase the log buffer size to deal with logspam, as increases will result in logd scale issues getting closer to hitting the background cgroup cpu cap. Once we hit that cap, logd spirals, pruning old entries slower than the incoming log entries. logd.writer will take 100% cpu. Change-Id: If4a7a74f300d078eeaed0ffd3eb3fd77d1f9fe90 --- logd/LogBuffer.cpp | 2 +- logd/README.property | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/logd/LogBuffer.cpp b/logd/LogBuffer.cpp index 1b829c602..ae950b59e 100644 --- a/logd/LogBuffer.cpp +++ b/logd/LogBuffer.cpp @@ -32,7 +32,7 @@ #include "LogReader.h" // Default -#define LOG_BUFFER_SIZE (256 * 1024) // Tuned on a per-platform basis here? +#define LOG_BUFFER_SIZE (256 * 1024) // Tuned with ro.logd.size per-platform #define log_buffer_size(id) mMaxSize[id] #define LOG_BUFFER_MIN_SIZE (64 * 1024UL) #define LOG_BUFFER_MAX_SIZE (256 * 1024 * 1024UL) diff --git a/logd/README.property b/logd/README.property index 75d9eb091..22f86b930 100644 --- a/logd/README.property +++ b/logd/README.property @@ -15,7 +15,11 @@ persist.logd.logpersistd string Enable logpersist daemon, "logcatd" persist.logd.size number ro Global default size of the buffer for all log ids at initial startup, at runtime use: logcat -b all -G -ro.logd.size number svelte default for persist.logd.size +ro.logd.size number svelte default for persist.logd.size. Larger + platform default sizes than 256KB are + known to not scale well under log spam + pressure. Address the spam first, + resist increasing the log buffer. persist.logd.size. number ro Size of the buffer for log ro.logd.size. number svelte default for persist.logd.size. ro.config.low_ram bool false if true, logd.statistics, logd.kernel