diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-05-11 16:42:26 -0400 |
---|---|---|
committer | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-05-16 13:45:20 -0400 |
commit | eeea7c2f80bdaf49a197a1c8149d7bc6cbc9395e (patch) | |
tree | ee24f7c1aecd6eb1fe6e6ca287d5bb3cabe864a1 /src/mongo/util/processinfo_windows.cpp | |
parent | 7cbc98eb835b4613e171ff11b567de3528d2ff6b (diff) | |
download | mongo-eeea7c2f80bdaf49a197a1c8149d7bc6cbc9395e.tar.gz |
SERVER-33706 Remove warning message about Windows FS cache configuration
Diffstat (limited to 'src/mongo/util/processinfo_windows.cpp')
-rw-r--r-- | src/mongo/util/processinfo_windows.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
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); |