Bug 1106656
Summary: | Docker run --memory value doesn't match cgroup value | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Chris Evich <cevich> |
Component: | docker | Assignee: | Matthew Heon <mheon> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | bsarathy, dwalsh, gouyang, jrieden, lsu, sghosh |
Target Milestone: | rc | Keywords: | Documentation |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-09-18 20:45:44 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1109938 |
Description
Chris Evich
2014-06-09 17:00:46 UTC
I think I caught this, the memory size must be a multiper of 4096. I tested below: set memory limits crgoup memory limits ================= ======================== 1024m 1073741824 1g 1073741824 1048576k 1073741824 1073741824 1073741824 1048576 1048576 1024575 1048576 1048577 1052672 (1048576 + 4096) 1052673 1056768 (1052672 + 4096) ================= ======================== so this should be not a bug. for the example in the bug, 524889 is between 524288 ~ 528384, so the value in cgroups should be the later.
#docker run -d -t -m 524889 some_image bash
# cat docker-dd95e808b318c29f3f79266118768d4cd196f3a9f2eea88bc8d473a71b58b27d.scope/memory.limit_in_bytes
528384
>>>528384 - 524288 (1024*4*(524889 / 4096)
4096
Great, thanks for confirming. Moving this to 'low' severity then since it'll just be a short documentation/man page update then. I'd suggest something like: The value may be rounded up to the next multiple of the host's memory page size(?) (typically 4k) unless an exact multiple is given. Patch sent to upstream for this (https://github.com/dotcloud/docker/pull/6680). Should appear in our builds of docker-1.0 for RHEL7 soon. Fixed in docker-1.0 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1266.html |