Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
272 views
in Technique[技术] by (71.8m points)

windows - How to I tune MongoDB Memory management under docker?

I have a Docker container running MongoDB which is running really slowly. The Db is about 5-6m documents, single collection, total size (from Compass) of about 75Gb. Its running on a Windows Server with 96Gb allocated, and Docker has 32Gb allocated, but the container is showing memory usage of only 60Mb. Resource Monitor has a mongod process with a working set of 42Gb but I'm not convinced this is right.

Any advice on how to set config to maximise available memory for Mongo / Docker? I've looked at other threads but nothing really addresses Mongo / Docker / Windows combo as far as I can see.

Thanks,


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

My issue was two fold: a) performance was due to poor indexing rather than anything else. With tuning this has now been resolved b) Memory management I found was confused by Docker, and Docker Desktop did not really help with diagnosis, so I've moved Mongo to native Windows and its now working a lot better.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...