Mongodb3.0配置文件

来源:互联网 时间:1970-01-01


基本配置如下:

systemLog:
  destination: file
  path: "/home/admin/mongodb3/logs/shard1.log"
  logAppend: true
  quite:true


processManagement:
  fork: true
  pidFilePath:"/home/admin/mongodb3/data/shard1.pid"


net:
  port:27017
  maxIncomingConnections:65535
  wireObjectCheck:true
  http:
    enabled: false
    JSONPEnabled: false
    RESTInterfaceEnabled: false


storage:
  dbPath:"/home/admin/mongodb3/data/shard1/"
  journal:
    enabled:true
  directoryPerDB:true
  engine:wiredTiger
  wiredTiger:
    engineConfig:
      cacheSizeGB: 2
      journalCompressor: snappy
      directoryForIndexes:true
    collectionConfig:
      blockCompressor: snappy
    indexConfig:
      prefixCompression:true


operationProfiling:
  slowOpThresholdMs:100
  mode:off


复制集增加如下配置:(在基本配置的基础上)
#replication Options
replication:
  oplogSizeMB:32
  replSetName:shard1


分片增加如下配置:(在基本配置的基础上)
#sharding Options
sharding:
  clusterRole: shardsvr
  archiveMovedChunks: true

Mongos的配置:
#            #mongos-only Options
replication:
   localPingThresholdMs: 15

   sharding:
       autoSplit: true
       configDB: <string>
       chunkSize: 64

systemLog:
  destination: file
  path: "/home/admin/mongodb3/logs/shard1.log"
  logAppend: true
  quite:true

net:
  port:27017

  maxIncomingConnections:65535




相关阅读:
Top