summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorSusan LoVerso <sue@wiredtiger.com>2014-05-13 12:34:49 -0400
committerSusan LoVerso <sue@wiredtiger.com>2014-05-13 12:34:49 -0400
commitf17eaaac762bb3ba50a0d789ffde131c7cf654ad (patch)
tree446dd33bd63c89251517fb427a203373324620a8 /bench
parent4a2583d492a2a923a895b897293689fae656a1e6 (diff)
downloadmongo-f17eaaac762bb3ba50a0d789ffde131c7cf654ad.tar.gz
Allow async to be reconfigured. #1002
Diffstat (limited to 'bench')
-rw-r--r--bench/wtperf/wtperf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c
index 2a4bf2cc618..d56b5452ad8 100644
--- a/bench/wtperf/wtperf.c
+++ b/bench/wtperf/wtperf.c
@@ -1323,6 +1323,19 @@ retry: if ((ret = cfg->conn->async_new_op(cfg->conn,
lprintf(cfg, ret, 0, "Re-opening the connection failed");
return (ret);
}
+ /*
+ * If we started async threads only for the purposes of compact,
+ * then turn it off before starting the workload so that those extra
+ * threads looking for work that will never arrive don't affect
+ * performance.
+ */
+ if (cfg->compact && cfg->use_asyncops == 0) {
+ if ((ret = cfg->conn->reconfigure(
+ cfg->conn, "async=(enabled=false)")) != 0) {
+ lprintf(cfg, ret, 0, "Reconfigure async off failed");
+ return (ret);
+ }
+ }
return (0);
}