简体   繁体   中英

How to control the memory usage of Mongo DB in windows?

I am using Mongo DB 2.6, Now I have upgrade my Mongo DB to 3.2 version. Now it is using lot of RAM size. Please someone explain me what is

  1. mongod --inMemorySizeGB
  2. mongod --WiredTigerCacheSizeGB

and how can I assign the value. when I try to assign the value I got the error like

Memory: { engineConfig: { inMemorySizeGB: 12 } } } }
2016-03-28T08:40:16.856+0530 E NETWORK  [initandlisten] listen(): bind() failed
errno:10048 Only one usage of each socket address (protocol/network address/port
) is normally permitted. for socket: 0.0.0.0:27017
2016-03-28T08:40:16.856+0530 E STORAGE  [initandlisten] Failed to set up sockets
 during startup.
2016-03-28T08:40:16.857+0530 I CONTROL  [initandlisten] dbexit:  rc: 48

I need to control the memory usage of Mongo DB, Is there any way for this?

you have to make changes to mongod.config file if you dont have sharded replicated cluster

storage:
  engine: inMemory
  inMemory:
    engineConfig:
      inMemorySizeGB: 140
      statisticsLogDelaySecs: 0

REF: https://docs.mongodb.com/manual/reference/configuration-options/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM