summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2014-06-12 17:54:00 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2014-06-12 17:55:11 -0400
commitc91b1561b38cbd9ac97fd60e84c004d930d16161 (patch)
treec7f0a3a1ec3722175ee19998a5ade0f23b899a62
parenta2d69514a4ebf111cab43953af45759e9f2a02b0 (diff)
downloadmongo-c91b1561b38cbd9ac97fd60e84c004d930d16161.tar.gz
SERVER-14230: Reduce thread count on linux-32
Linux-32 machines are hitting mutex exhaustion often. Use a lower number of thread (1/3 of the original number) to run the tests in 32-bit versions to avoid mutex exhaustion.
-rw-r--r--src/mongo/dbtests/threadedtests.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/dbtests/threadedtests.cpp b/src/mongo/dbtests/threadedtests.cpp
index 564564164e0..3907ff3855e 100644
--- a/src/mongo/dbtests/threadedtests.cpp
+++ b/src/mongo/dbtests/threadedtests.cpp
@@ -37,6 +37,7 @@
#include "mongo/db/d_concurrency.h"
#include "mongo/dbtests/dbtests.h"
#include "mongo/platform/atomic_word.h"
+#include "mongo/platform/bits.h"
#include "mongo/stdx/functional.h"
#include "mongo/util/concurrency/mvar.h"
#include "mongo/util/concurrency/thread_pool.h"
@@ -81,8 +82,13 @@ namespace ThreadedTests {
}
};
+
+#ifdef MONGO_PLATFORM_32
+ // Avoid OOM on Linux-32 by using fewer threads
+ const int nthr=45;
+#else
const int nthr=135;
- //const int nthr=7;
+#endif
class MongoMutexTest : public ThreadedTest<nthr> {
#if defined(_DEBUG)
enum { N = 2000 };