Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
271 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...