[SERVER-52596] Detect memLimitMB in K8S pod and inform WiredTigerCacheSize calculation for pod RAM instead of total system RAM Created: 03/Nov/20 Updated: 29/Oct/23 Resolved: 05/Jan/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0, 4.4.4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Hemant Jain | Assignee: | Henrik Edin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||
| Sprint: | Execution Team 2020-12-28, Execution Team 2021-01-11 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
I am deploying mongo db 4.4.1 (windows servercore 1809 image) container on K8S. No operators are used, using the community edition mongo db container. The memory limit on the ‘pod’ is set at 300M. However the container start fail with out of memory exception. Looking deeper in the logs, it turns out that wired tiger is trying to build a cache of size ~3GB which is resulting in the exception. relevant log lines -
|
| Comments |
| Comment by Githook User [ 12/Jan/21 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: (cherry picked from commit d2e4a1601475f7c7f72d11cfe1b554963214a0e5) |
| Comment by Ian Whalen (Inactive) [ 07/Jan/21 ] |
|
Author: {'username': u'evrg-bot-webhook', 'name': u'Henrik Edin', 'email': u'henrik.edin@mongodb.com'}Message: |
| Comment by Henrik Edin [ 05/Jan/21 ] |
|
https://github.com/mongodb/mongo/commit/d2e4a1601475f7c7f72d11cfe1b554963214a0e5 |
| Comment by Eric Sedor [ 05/Nov/20 ] |
|
Thanks mail2h.jain@gmail.com, I'll pass this on to an appropriate team for consideration as a possible improvement. In case you have not already done so, you'll want to configure the storage.wiredTiger.engineConfig.cacheSizeGB setting manually using this guidance in our Production Notes. Some discussion about containers is included at the end of the WiredTiger section:
|