summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2019-08-20 14:34:45 -0400
committerGregory Wlodarek <gregory.wlodarek@mongodb.com>2019-08-21 09:24:27 -0400
commitf5ee95fe7e9e6ca3db9db01e97a917f754d4d8cd (patch)
tree8265e2c2e880e080a565f3b067ee4ccaff9dd14b /src/mongo
parentf9aa31e3da8a8f4b85a0eb4be7ae5654776b816a (diff)
downloadmongo-f5ee95fe7e9e6ca3db9db01e97a917f754d4d8cd.tar.gz
SERVER-25985 Remove rlimit check for nProcesses and nFiles during startup
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/startup_warnings_mongod.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp
index 6a28f1c24b0..29a452f687e 100644
--- a/src/mongo/db/startup_warnings_mongod.cpp
+++ b/src/mongo/db/startup_warnings_mongod.cpp
@@ -308,41 +308,20 @@ void logMongodStartupWarnings(const StorageGlobalParams& storageParams,
log() << "** WARNING: getrlimit failed. " << errmsg << startupWarningsLog;
}
-// Solaris does not have RLIMIT_NPROC & RLIMIT_MEMLOCK, these are exposed via getrctl(2) instead
+// Solaris does not have RLIMIT_MEMLOCK, these are exposed via getrctl(2) instead
#ifndef __sun
- // Check # of processes >= # of files/2
// Check we can lock at least 16 pages for the SecureAllocator
- const double filesToProcsRatio = 2.0;
const unsigned int minLockedPages = 16;
struct rlimit rlmemlock;
- struct rlimit rlnproc;
- if (!getrlimit(RLIMIT_NPROC, &rlnproc) && !getrlimit(RLIMIT_MEMLOCK, &rlmemlock)) {
+ if (!getrlimit(RLIMIT_MEMLOCK, &rlmemlock)) {
if ((rlmemlock.rlim_cur / ProcessInfo::getPageSize()) < minLockedPages) {
log() << startupWarningsLog;
log() << "** WARNING: soft rlimits too low. The locked memory size is "
<< rlmemlock.rlim_cur << " bytes, it should be at least "
<< minLockedPages * ProcessInfo::getPageSize() << " bytes" << startupWarningsLog;
}
-
- if (false) {
- // juse to make things cleaner
- }
-#ifdef __APPLE__
- else if (rlnproc.rlim_cur >= 709) {
- // os x doesn't make it easy to go higher
- // ERH thinks its ok not to add the warning in this case 7/3/2012
- }
-#endif
- else if (rlnproc.rlim_cur < rlnofile.rlim_cur / filesToProcsRatio) {
- log() << startupWarningsLog;
- log() << "** WARNING: soft rlimits too low. rlimits set to " << rlnproc.rlim_cur
- << " processes, " << rlnofile.rlim_cur
- << " files. Number of processes should be at least "
- << rlnofile.rlim_cur / filesToProcsRatio << " : " << 1 / filesToProcsRatio
- << " times number of files." << startupWarningsLog;
- }
} else {
const auto errmsg = errnoWithDescription();
log() << startupWarningsLog;