summaryrefslogtreecommitdiff
path: root/src/mongo/db/startup_warnings_mongod.cpp
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2017-10-18 19:00:45 -0400
committerXiangyu Yao <xiangyu.yao@mongodb.com>2017-11-10 10:33:48 -0500
commiteaf6c96f4893946cd62d6565d3aab92901b92ad8 (patch)
treeaf6ba5bffb629c819284a7163b0a5af5af36d9d3 /src/mongo/db/startup_warnings_mongod.cpp
parent69ab9781d7a646a6029e5c46d340685e80e404fa (diff)
downloadmongo-eaf6c96f4893946cd62d6565d3aab92901b92ad8.tar.gz
SERVER-29465 Add warning about Windows SystemFileCacheSize for WiredTiger
Diffstat (limited to 'src/mongo/db/startup_warnings_mongod.cpp')
-rw-r--r--src/mongo/db/startup_warnings_mongod.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp
index a15bf056428..6f0c42263f3 100644
--- a/src/mongo/db/startup_warnings_mongod.cpp
+++ b/src/mongo/db/startup_warnings_mongod.cpp
@@ -369,6 +369,23 @@ void logMongodStartupWarnings(const StorageGlobalParams& storageParams,
warned = true;
}
+ if (storageParams.engine == "wiredTiger") {
+ // If the filesystemMaxCacheSize / totalMemorySize > 0.4, we should raise this
+ // warning because it leads to terrible performance for WiredTiger
+ const double filesystemCachePercentageThreshold = 0.4;
+ if (p.getMaxSystemFileCachePercentage() > filesystemCachePercentageThreshold) {
+ log() << startupWarningsLog;
+ log()
+ << "** WARNING: The file system cache of this machine is configured to be greater "
+ << "than " << 100 * filesystemCachePercentageThreshold << "% of the total memory. "
+ << "This can lead to increased memory pressure and poor performance."
+ << startupWarningsLog;
+ log() << "See http://dochub.mongodb.org/core/wt-windows-system-file-cache"
+ << startupWarningsLog;
+ warned = true;
+ }
+ }
+
#endif // #ifdef _WIN32
if (storageParams.engine == "ephemeralForTest") {