mongodb配置參數

Options:

General options:
  -h [ --help ]                         show this usage information//顯示使用信息
  --version                             show version information//顯示版本信息
  -f [ --config ] arg                   configuration file specifying //包含額外選項的配置文件
                                        additional options
  -v [ --verbose ] [=arg(=v)]           be more verbose (include multiple times
                                        for more verbosity e.g. -vvvvv)//顯示更詳細的輸出
  --quiet                               quieter output//靜默輸出模式
  --port arg                            specify port number - 27017 by default//指定端口--默認27017
  --bind_ip arg                         comma separated list of ip addresses to
                                        listen on - all local ips by default//監聽IP地址,使用都好分開
  --ipv6                                enable IPv6 support (disabled by 
                                        default)啓用IPv6
  --maxConns arg                        max number of simultaneous connections 
                                        - 1000000 by default同時最大鏈接數,默認百萬
  --logpath arg                         log file to send write to instead of 
                                        stdout - has to be a file, not 
                                        directory//輸出文件位置,必須爲文件
  --syslog                              log to system's syslog facility instead
                                        of file or stdout//輸出倒syslog
  --syslogFacility arg                  syslog facility used for mongodb syslog
                                        message//syslog的Facility級別
  --logappend                           append to logpath instead of 
                                        over-writing//追加模式,而不是覆蓋模式
  --logRotate arg                       set the log rotation behavior 
                                        (rename|reopen)//日誌循環模式,重命名從新打開
  --timeStampFormat arg                 Desired format for timestamps in log 
                                        messages. One of ctime, iso8601-utc or 
                                        iso8601-local//時間戳格式
  --pidfilepath arg                     full path to pidfile (if not set, no 
                                        pidfile is created)//pid文件,不指定不建立。
  --keyFile arg                         private key for cluster authentication//集羣認證的key文件
  --noauth                              run without security//無認證模式運行
  --setParameter arg                    Set a configurable parameter//設定可配置的參數
  --httpinterface                       enable http interface//啓用http接口
  --clusterAuthMode arg                 Authentication mode used for cluster 
                                        authentication. Alternatives are 
                                        (keyFile|sendKeyFile|sendX509|x509)//集羣認證模式,可選有
(keyfile,sendKeyFile,sendX509,x509)
  --nounixsocket                        disable listening on unix sockets禁止unixsockets監聽
  --unixSocketPrefix arg                alternative directory for UNIX domain unixdomainsockets路徑
                                        sockets (defaults to /tmp)
  --filePermissions arg                 permissions to set on UNIX domain 
                                        socket file - 0700 by default//文件權限
  --fork                                fork server process//fork後臺運行
  --auth                                run with security//使用認證模式
  --jsonp                               allow JSONP access via http (has 
                                        security implications)//容許經過http使用JSONP訪問
  --rest                                turn on simple rest api啓用rest api
  --slowms arg (=100)                   value of slow for profile and console 
                                        log慢日誌
  --profile arg                         0=off 1=slow, 2=all
  --cpu                                 periodically show cpu and iowait 
                                        utilization//週期性現實cpu和iowait使用狀況
  --sysinfo                             print some diagnostic system 
                                        information
  --noIndexBuildRetry                   don't retry any index builds that were 
                                        interrupted by shutdown
  --noscripting                         disable scripting engine//禁用腳本引擎
  --notablescan                         do not allow table scans//不容許表掃描

Replication options:
  --oplogSize arg                       size to use (in MB) for replication op 
                                        log. default is 5% of disk space (i.e. 
                                        large is good)

Master/slave options (old; use replica sets instead):
  --master                              master mode
  --slave                               slave mode
  --source arg                          when slave: specify master as 
                                        <server:port>
  --only arg                            when slave: specify a single database 
                                        to replicate
  --slavedelay arg                      specify delay (in seconds) to be used 
                                        when applying master ops to slave
  --autoresync                          automatically resync if slave data is 
                                        stale

Replica set options:
  --replSet arg                         arg is <setname>[/<optionalseedhostlist
                                        >]
  --replIndexPrefetch arg               specify index prefetching behavior (if 
                                        secondary) [none|_id_only|all]
  --enableMajorityReadConcern           enables majority readConcern

Sharding options:
  --configsvr                           declare this is a config db of a 
                                        cluster; default port 27019; default 
                                        dir /data/configdb
  --configsvrMode arg                   Controls what config server protocol is
                                        in use. When set to "sccc" keeps server
                                        in legacy SyncClusterConnection mode 
                                        even when the service is running as a 
                                        replSet
  --shardsvr                            declare this is a shard db of a 
                                        cluster; default port 27018

Storage options://存儲選項
  --storageEngine arg                   what storage engine to use - defaults 
                                        to wiredTiger if no data files present
//使用的存儲運行,默認爲wiredTiger
  --dbpath arg                          directory for datafiles - defaults to 
                                        /data/db//數據文件路徑,默認/data/db
  --directoryperdb                      each database will be stored in a 
                                        separate directory//每一個數據庫一個文件夾
  --noprealloc                          disable data file preallocation - will 
                                        often hurt performance//禁止數據文件預分配--總會下降性能
  --nssize arg (=16)                    .ns file size (in MB) for new databases//新數據庫的ns文件大小MB
  --quota                               limits each database to a certain 
                                        number of files (8 default)//每一個數據庫特定文件數量,默認爲8
  --quotaFiles arg                      number of files allowed per db, implies
                                        --quota//每一個db容許的文件數/
  --smallfiles                          use a smaller default file size//使用更小的默認文件數量
  --syncdelay arg (=60)                 seconds between disk syncs (0=never, 
                                        but not recommended)//磁盤同步時間間隔
  --upgrade                             upgrade db if needed//必要時升級db
  --repair                              run repair on all dbs//全部db上進行修復
  --repairpath arg                      root directory for repair files - 
                                        defaults to dbpath//修復文件的根目錄
  --journal                             enable journaling//啓用journaling
  --nojournal                           disable journaling (journaling is on by
                                        default for 64 bit)//禁用
  --journalOptions arg                  journal diagnostic options//日誌診斷選項
  --journalCommitInterval arg           how often to group/batch commit (ms)

WiredTiger options://存儲引擎WiredTiger選項
  --wiredTigerCacheSizeGB arg           maximum amount of memory to allocate 
                                        for cache; defaults to 1/2 of physical 
                                        RAM//內存分配cache的最大數量,默認爲無力內存一半。
  --wiredTigerStatisticsLogDelaySecs arg (=0)
                                        seconds to wait between each write to a
                                        statistics file in the dbpath; 0 means 
                                        do not log statistics//
  --wiredTigerJournalCompressor arg (=snappy)
                                        use a compressor for log records 
                                        [none|snappy|zlib]//日誌記錄壓縮
  --wiredTigerDirectoryForIndexes       Put indexes and data in different 
                                        directories//將索引和數據放在不一樣的目錄
  --wiredTigerCollectionBlockCompressor arg (=snappy)//塊壓縮算法
                                        block compression algorithm for 
                                        collection data [none|snappy|zlib]
  --wiredTigerIndexPrefixCompression arg (=1)//
                                        use prefix compression on row-store 
                                        leaf pages
相關文章
相關標籤/搜索