From fe587418ea7a71f34e5a0f49eb20148e82b9c389 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 2 Dec 2013 22:23:07 +0000 Subject: doc: refer to malloc-related environment variables Using non-portable mallopt/mallctl functions is not feasible because detecting them correctly at _link_ time is not easy. Detecting them at compile time is insufficient because malloc implementations can be swapped at link time (and even with LD_PRELOAD, unfortunately). --- cmogstored.x | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cmogstored.x b/cmogstored.x index aa3167c..3fcc91b 100644 --- a/cmogstored.x +++ b/cmogstored.x @@ -15,6 +15,22 @@ MOG_IOSTAT_CMD - command-line for invoking iostat(1). This is used by the sidechannel to report disk utilization to trackers. Default: "iostat -dx 1 30" +See MALLOC TUNING for environment variables which may affect memory +usage. + +[MALLOC TUNING] + +malloc(3) implementations tuned for multithreading speed (and not memory +usage) may cause large amounts of metadata overhead in infrequently-used +arenas. While cmogstored may use many threads for filesystem I/O, +cmogstored is designed to not be dependent on malloc(3) performance nor +scalability. + +For on GNU/Linux systems with glibc, we recommend setting +MALLOC_ARENA_TEST and MALLOC_ARENA_MAX to low numbers to limit the +number arenas. Setting the value of each to 1 or 2 should be enough, +even. + [REPORTING BUGS] Only bug reports in plain-text email will be read. You may also report bugs publically to the MogileFS mailing list -- cgit v1.2.3-24-ge0c7