发布于 2015-09-14 15:01:55 | 161 次阅读 | 评论: 0 | 来源: 网络整理
在 2.4 版更改.
MongoDB provides a number of configuration options that are accessible via the --setParameter option to mongod. This document documents all of these options.
For additional run time configuration options, see 配置文件选项 and Manual Page for mongod.
2.4 新版功能.
Specify 0 to disable localhost authentication bypass. Enabled by default.
enableLocalhostAuthBypass is not available using setParameter database command. Use the setParameter option in the configuration file or the --setParameter option on the command line.
2.4 新版功能.
enableTestCommands enables a set of internal commands useful for internal testing operations. enableTestCommands is only available when starting mongod and you cannot use setParameter to modify this parameter. Consider the following mongod innovation, which sets enableTestCommands:
mongod --enableTestCommands=1
enableTestCommands provides access to the following internal commands:
Specify an integer between 1 and 500 signifying the number of milliseconds (ms) between journal commits.
Consider the following example which sets the :paramter:`journalCommitInterval` to 200 ms:
use admin
db.runCommand( { setParameter: 1, journalCommitInterval: 200 } )
也可以参考
2.4 新版功能.
Specify 1 to enable logging of userids.
Disabled by default.
Specify an integer between 0 and 5 signifying the verbosity of the logging, where 5 is the most verbose.
Consider the following example which sets the logLevel to 2:
use admin
db.runCommand( { setParameter: 1, logLevel: 2 } )
也可以参考
Specify whether queries must use indexes. If true, queries that perform a table scan instead of using an index will fail.
Consider the following example which sets :paramter:`notablescan` to true:
use admin
db.runCommand( { setParameter: 1, notablescan: true } )
也可以参考
2.4 新版功能.
Specify the number of oplog entries to apply as a single batch. replApplyBatchSize must be an integer between 1 and 1024. Only specify this option on secondary members of replica set.
Batch sizes must be 1 for members with slaveDelay configured.
2.4 新版功能.
supportCompatibilityFormPrivilegeDocuments is not available using setParameter database command. Use the setParameter option in the configuration file or the --setParameter option on the command line.
Specify the interval in seconds between fsync operations where mongod flushes its working memory to disk. By default, mongod flushes memory to disk every 60 seconds. Do not change this value unless you see a background flush average greater than 60 seconds.
Consider the following example which sets the syncdelay to 60 seconds:
db = db.getSiblingDB("admin")
db.runCommand( { setParameter: 1, syncdelay: 60 } )
也可以参考
2.2 新版功能.
Configures mongod log full stack traces on assertions or errors. If true, mongod will log full stack traces on assertions or errors.
Consider the following example which sets the traceExceptions to true:
use admin
db.runCommand( { setParameter: 1, traceExceptions: true } )
也可以参考
Sets quiet logging mode. If true, mongod will go into a quiet logging mode which will not log the following events/activities:
- connection events;
- the drop command, the dropIndexes command, the diagLogging command, the validate command, and the clean command; and
- replication synchronization activities.
Consider the following example which sets the quiet to true:
db = db.getSiblingDB("admin")
db.runCommand( { setParameter: 1, quiet: true } )
也可以参考