diff options
Diffstat (limited to 'src/mongo/util')
-rw-r--r-- | src/mongo/util/processinfo.h | 6 | ||||
-rw-r--r-- | src/mongo/util/processinfo_freebsd.cpp | 4 | ||||
-rw-r--r-- | src/mongo/util/processinfo_linux.cpp | 4 | ||||
-rw-r--r-- | src/mongo/util/processinfo_openbsd.cpp | 4 | ||||
-rw-r--r-- | src/mongo/util/processinfo_osx.cpp | 4 | ||||
-rw-r--r-- | src/mongo/util/processinfo_solaris.cpp | 4 | ||||
-rw-r--r-- | src/mongo/util/processinfo_unknown.cpp | 4 | ||||
-rw-r--r-- | src/mongo/util/processinfo_windows.cpp | 33 |
8 files changed, 0 insertions, 63 deletions
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); |