summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2018-05-11 16:42:26 -0400
committerXiangyu Yao <xiangyu.yao@mongodb.com>2018-05-16 13:45:20 -0400
commiteeea7c2f80bdaf49a197a1c8149d7bc6cbc9395e (patch)
treeee24f7c1aecd6eb1fe6e6ca287d5bb3cabe864a1
parent7cbc98eb835b4613e171ff11b567de3528d2ff6b (diff)
downloadmongo-eeea7c2f80bdaf49a197a1c8149d7bc6cbc9395e.tar.gz
SERVER-33706 Remove warning message about Windows FS cache configuration
-rw-r--r--src/mongo/db/startup_warnings_mongod.cpp17
-rw-r--r--src/mongo/util/processinfo.h6
-rw-r--r--src/mongo/util/processinfo_freebsd.cpp4
-rw-r--r--src/mongo/util/processinfo_linux.cpp4
-rw-r--r--src/mongo/util/processinfo_openbsd.cpp4
-rw-r--r--src/mongo/util/processinfo_osx.cpp4
-rw-r--r--src/mongo/util/processinfo_solaris.cpp4
-rw-r--r--src/mongo/util/processinfo_unknown.cpp4
-rw-r--r--src/mongo/util/processinfo_windows.cpp33
9 files changed, 0 insertions, 80 deletions
diff --git a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp
index 2f0ad080ee0..9dcd4e387f6 100644
--- a/src/mongo/db/startup_warnings_mongod.cpp
+++ b/src/mongo/db/startup_warnings_mongod.cpp
@@ -369,23 +369,6 @@ 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") {
diff --git a/src/mongo/util/processinfo.h b/src/mongo/util/processinfo.h
index f02f1a78493..9e917eea89a 100644
--- a/src/mongo/util/processinfo.h
+++ b/src/mongo/util/processinfo.h
@@ -159,12 +159,6 @@ public:
static bool blockInMemory(const void* start);
/**
- * Returns a positive floating point number between 0.0 and 1.0 that
- * reflects the maximum percentage of RAM the filesystem cache is allowed to grow.
- */
- static double getMaxSystemFileCachePercentage();
-
- /**
* Returns a positive floating point number between 0.0 and 1.0 to inform MMapV1 how much it
* must remap pages to bring the system page file implementation back below a certain
* threshold. A number of 1.0 means remap everything.
diff --git a/src/mongo/util/processinfo_freebsd.cpp b/src/mongo/util/processinfo_freebsd.cpp
index 3041d0f4387..60ce6c60a41 100644
--- a/src/mongo/util/processinfo_freebsd.cpp
+++ b/src/mongo/util/processinfo_freebsd.cpp
@@ -120,10 +120,6 @@ int ProcessInfo::getResidentSize() {
return rss;
}
-double ProcessInfo::getMaxSystemFileCachePercentage() {
- return 0.0;
-}
-
double ProcessInfo::getSystemMemoryPressurePercentage() {
return 0.0;
}
diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp
index 5db07c94661..01b8ae08c80 100644
--- a/src/mongo/util/processinfo_linux.cpp
+++ b/src/mongo/util/processinfo_linux.cpp
@@ -453,10 +453,6 @@ int ProcessInfo::getResidentSize() {
return (int)((p.getResidentSizeInPages() * getPageSize()) / (1024.0 * 1024));
}
-double ProcessInfo::getMaxSystemFileCachePercentage() {
- return 0.0;
-}
-
double ProcessInfo::getSystemMemoryPressurePercentage() {
return 0.0;
}
diff --git a/src/mongo/util/processinfo_openbsd.cpp b/src/mongo/util/processinfo_openbsd.cpp
index 7db5cb4e908..eea256a75f1 100644
--- a/src/mongo/util/processinfo_openbsd.cpp
+++ b/src/mongo/util/processinfo_openbsd.cpp
@@ -130,10 +130,6 @@ int ProcessInfo::getResidentSize() {
return rss;
}
-double ProcessInfo::getMaxSystemFileCachePercentage() {
- return 0.0;
-}
-
double ProcessInfo::getSystemMemoryPressurePercentage() {
return 0.0;
}
diff --git a/src/mongo/util/processinfo_osx.cpp b/src/mongo/util/processinfo_osx.cpp
index f244bea4da9..2bef916c80b 100644
--- a/src/mongo/util/processinfo_osx.cpp
+++ b/src/mongo/util/processinfo_osx.cpp
@@ -118,10 +118,6 @@ int ProcessInfo::getResidentSize() {
return (int)(ti.resident_size / (1024 * 1024));
}
-double ProcessInfo::getMaxSystemFileCachePercentage() {
- return 0.0;
-}
-
double ProcessInfo::getSystemMemoryPressurePercentage() {
return 0.0;
}
diff --git a/src/mongo/util/processinfo_solaris.cpp b/src/mongo/util/processinfo_solaris.cpp
index 26ff218d90c..5f40c5aaa13 100644
--- a/src/mongo/util/processinfo_solaris.cpp
+++ b/src/mongo/util/processinfo_solaris.cpp
@@ -127,10 +127,6 @@ int ProcessInfo::getResidentSize() {
return static_cast<int>(p.psinfo.pr_rssize / 1024);
}
-double ProcessInfo::getMaxSystemFileCachePercentage() {
- return 0.0;
-}
-
double ProcessInfo::getSystemMemoryPressurePercentage() {
return 0.0;
}
diff --git a/src/mongo/util/processinfo_unknown.cpp b/src/mongo/util/processinfo_unknown.cpp
index a8960e27de0..8984012b13c 100644
--- a/src/mongo/util/processinfo_unknown.cpp
+++ b/src/mongo/util/processinfo_unknown.cpp
@@ -53,10 +53,6 @@ int ProcessInfo::getResidentSize() {
return -1;
}
-double ProcessInfo::getMaxSystemFileCachePercentage() {
- return 0.0;
-}
-
double ProcessInfo::getSystemMemoryPressurePercentage() {
return 0.0;
}
diff --git a/src/mongo/util/processinfo_windows.cpp b/src/mongo/util/processinfo_windows.cpp
index 7aba688d2df..473f59c37c3 100644
--- a/src/mongo/util/processinfo_windows.cpp
+++ b/src/mongo/util/processinfo_windows.cpp
@@ -119,39 +119,6 @@ int ProcessInfo::getResidentSize() {
return _wconvertmtos(pmc.WorkingSetSize);
}
-double ProcessInfo::getMaxSystemFileCachePercentage() {
- SIZE_T minCacheSize = 0;
- SIZE_T maxCacheSize = 0;
- DWORD flags = 0;
- BOOL status = GetSystemFileCacheSize(&minCacheSize, &maxCacheSize, &flags);
- if (!status) {
- DWORD gle = GetLastError();
- severe() << "GetSystemFileCacheSize failed with " << errnoWithDescription(gle);
- fassertFailed(40667);
- }
-
- if (!(flags & FILE_CACHE_MAX_HARD_ENABLE)) {
- return 1.0;
- }
-
- MEMORYSTATUSEX mse;
- mse.dwLength = sizeof(mse);
- status = GlobalMemoryStatusEx(&mse);
- if (!status) {
- DWORD gle = GetLastError();
- severe() << "GlobalMemoryStatusEx failed with " << errnoWithDescription(gle);
- fassertFailed(40668);
- }
-
- DWORDLONG totalMemorySize = mse.ullTotalPhys;
- if (totalMemorySize == 0) {
- severe() << "Total memory is 0";
- fassertFailed(40669);
- }
-
- return static_cast<double>(maxCacheSize) / totalMemorySize;
-}
-
double ProcessInfo::getSystemMemoryPressurePercentage() {
MEMORYSTATUSEX mse;
mse.dwLength = sizeof(mse);