summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2019-08-08 09:56:50 -0400
committerLouis Williams <louis.williams@mongodb.com>2019-08-08 09:56:50 -0400
commit70a987f5efd85c3162823e8a07f49566b10d2020 (patch)
tree08a36ba9cf17c0e0073e6ac4090f7419adf2d8ff
parent43503a9e56fbf3a0fbdd4e780b1ec438ccc74ee4 (diff)
downloadmongo-70a987f5efd85c3162823e8a07f49566b10d2020.tar.gz
SERVER-41492 Add tunable parameters for WiredTiger file manager options
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp3
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_parameters.idl21
2 files changed, 23 insertions, 1 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index 09566bd3465..ad3da83d801 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -587,7 +587,8 @@ WiredTigerKVEngine::WiredTigerKVEngine(const std::string& canonicalName,
// If we're readOnly skip all WAL-related settings.
ss << "log=(enabled=true,archive=true,path=journal,compressor=";
ss << wiredTigerGlobalOptions.journalCompressor << "),";
- ss << "file_manager=(close_idle_time=100000),"; //~28 hours, will put better fix in 3.1.x
+ ss << "file_manager=(close_idle_time=" << gWiredTigerFileHandleCloseIdleTime
+ << ",close_handle_minimum=" << gWiredTigerFileHandleCloseMinimum << "),";
ss << "statistics_log=(wait=" << wiredTigerGlobalOptions.statisticsLogDelaySecs << "),";
if (shouldLog(::mongo::logger::LogComponent::kStorageRecovery,
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.idl b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.idl
index aa0a246835e..6e4d632d750 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.idl
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.idl
@@ -120,3 +120,24 @@ server_parameters:
data: 'std::pair<double, WiredTigerKVEngine*>'
override_set: true
condition: { expr: false }
+
+ wiredTigerFileHandleCloseIdleTime:
+ description: >-
+ The amount of time in seconds a file handle in WiredTiger needs to be idle before attempting
+ to close it.
+ set_at: startup
+ cpp_vartype: 'std::int32_t'
+ cpp_varname: gWiredTigerFileHandleCloseIdleTime
+ default: 100000
+ validator:
+ gte: 1
+
+ wiredTigerFileHandleCloseMinimum:
+ description: >-
+ The number of handles open before the WiredTiger file manager will look for handles to close.
+ set_at: startup
+ cpp_vartype: 'std::int32_t'
+ cpp_varname: gWiredTigerFileHandleCloseMinimum
+ default: 250
+ validator:
+ gte: 1