Remount /var/lib/docker as --private to fix scaling issue#4884
Merged
vieux merged 1 commit intomoby:masterfrom Mar 29, 2014
Merged
Remount /var/lib/docker as --private to fix scaling issue#4884vieux merged 1 commit intomoby:masterfrom
vieux merged 1 commit intomoby:masterfrom
Conversation
Contributor
|
This should probably be moved into runtime/runtime.go.NewRuntimeFromDirectory |
Contributor
|
I agree with @crosbymichael |
If an admin mounts all file systems as -rshared (Default on RHEL and Fedora) we see a scaling problem as the number of container increase. Basically every new container needs to have it new mounts in /var/lib/docker shared to all other containers, this ends up with us only able to scale to around 100 containers, before the system slows down. By simply bind mounting /var/lib/docker on its and then setting it private, the scaling issue goes away. Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Contributor
Author
|
Moved to runtime/runtime.go.NewRuntimeFromDirectory and now using config.Root. |
Contributor
|
LGTM |
Contributor
There was a problem hiding this comment.
Should this be inside the if block for !mounted ?
Contributor
Author
|
No. It is checking to see if /var/lib/docker is a mountpoint, if it is not, it will bind mount it on top of itself, making it a mount point. Then it sets the mountpoint to "private" meaning changes to /var/lib/docker mount points will not be seen in other namespaces. |
Contributor
|
LGTM |
Contributor
|
@vieux do you care yo try this PR on your aufs system? |
Contributor
|
LGTM |
vieux
added a commit
that referenced
this pull request
Mar 29, 2014
Remount /var/lib/docker as --private to fix scaling issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If an admin mounts all file systems as -rshared (Default on RHEL and Fedora)
we see a scaling problem as the number of container increase.
Basically every new container needs to have it new mounts in /var/lib/docker
shared to all other containers, this ends up with us only able to scale to
around 100 containers, before the system slows down.
By simply bind mounting /var/lib/docker on its and then setting it private,
the scaling issue goes away.
Docker-DCO-1.1-Signed-off-by: Dan Walsh dwalsh@redhat.com (github: rhatdan)