Bug 1474859 - [RFE] Make OpenShift mongodb image to detect WiredTiger cache size automatically
[RFE] Make OpenShift mongodb image to detect WiredTiger cache size automatically
Status: NEW
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Honza Horak
Xiaoli Tian
Depends On:
  Show dependency treegraph
Reported: 2017-07-25 10:02 EDT by Alexander Koksharov
Modified: 2018-01-25 16:52 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexander Koksharov 2017-07-25 10:02:15 EDT
Description of problem:

The current openshift mongodb 3.2 image (registry.access.redhat.com/rhscl/mongodb-32-rhel7) incorrectly detects the WiredTiger cache size.  WiredTiger internal cache, by default, will use the larger of either:
    60% of RAM minus 1 GB, or
    1 GB.

To workaround the issue we set cache_size manually using configmap:
       configString : cache_size=400M

in the mongo shell:
> db.serverStatus().wiredTiger.cache["maximum bytes configured"]

We would like the image to automatically configure itself so it works reliably if you have less than 1.5G of RAM set as the limit by default. Currently if you have a limit of 1G or less, it is guaranteed that MongoDB will fail at some point as the wiredTiger cache will occupy all the memory and it won't be able to accept connections. It would also be nice to have the option to configure it using an env var, as we currently use a ConfigMap mounted over the config, which is a bit involved. This would allow us to more easily tweak the setting if it's not necessarily optimally autodetected.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Note You need to log in before you can comment on or make changes to this bug.