summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-03-21 19:25:15 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-03-21 19:25:15 +0000
commitd346eade1ec34a6c09b95317138211cf966a945b (patch)
treedc8ee2ca87b10a63104f32c4e507d23b9e64229b
parent966b216ee8d9d8dab52b726e66673ffa71d861cb (diff)
downloadmongo-d346eade1ec34a6c09b95317138211cf966a945b.tar.gz
Add a section on replacing the default system memory allocator to the
tuning page. An example setting the cache to 10MB isn't useful, crank the example to 500MB.
-rw-r--r--docs/src/spell.ok3
-rw-r--r--docs/src/tuning.dox14
-rw-r--r--examples/c/ex_config.c2
3 files changed, 16 insertions, 3 deletions
diff --git a/docs/src/spell.ok b/docs/src/spell.ok
index dab1d9ade86..05071b53215 100644
--- a/docs/src/spell.ok
+++ b/docs/src/spell.ok
@@ -133,6 +133,7 @@ inuse
io
ip
je
+jemalloc
jni
json
keyexist
@@ -154,6 +155,7 @@ lsn
lt
mailto
mainpage
+malloc
malloc'd
marshalled
marshalling
@@ -255,6 +257,7 @@ subpage
superset
tablename
tcl
+tcmalloc
td
th
thang
diff --git a/docs/src/tuning.dox b/docs/src/tuning.dox
index 71117cfdc29..e179e362bcc 100644
--- a/docs/src/tuning.dox
+++ b/docs/src/tuning.dox
@@ -9,7 +9,7 @@ function.
The effectiveness of the cache can be measured by reviewing the page
eviction statistics for the database.
-An example of setting a cache size to 10MB:
+An example of setting a cache size to 500MB:
@snippet ex_config.c configure cache size
@@ -90,6 +90,17 @@ An example of configuring page sizes:
@snippet ex_file.c file create
+@section memory Memory allocation
+
+I/O intensive threaded applications, where the working set does not fit
+into the available cache, can be dominated by memory allocation because
+the WiredTiger engine has to free and re-allocate memory as part of many
+queries. Replacing the system's malloc implementation with one that has
+better threaded performance (for example, Google's
+<a href="http://goog-perftools.sourceforge.net/doc/tcmalloc.html">tcmalloc</a>,
+or <a href="http://www.canonware.com/jemalloc">jemalloc</a>),
+can dramatically improve throughput.
+
@section statistics Performance monitoring with statistics
WiredTiger maintains a variety of statistics that can be read with a
@@ -116,5 +127,4 @@ statistics until the cursor returns the end of the list.
Note the raw value of the statistic is available from the \c value
field, as well as a printable string version of the value.
-
*/
diff --git a/examples/c/ex_config.c b/examples/c/ex_config.c
index 2b7f8d5d09f..4f3d109abde 100644
--- a/examples/c/ex_config.c
+++ b/examples/c/ex_config.c
@@ -46,7 +46,7 @@ int main(void)
/*! [configure cache size] */
if ((ret = wiredtiger_open(home, NULL,
- "create,cache_size=10M", &conn)) != 0)
+ "create,cache_size=500M", &conn)) != 0)
fprintf(stderr, "Error connecting to %s: %s\n",
home, wiredtiger_strerror(ret));
/*! [configure cache size] */