Skip to content

Conversation

jvermillard
Copy link

Added a "docker run" option for sizing /dev/shm which is actually
hardcoded to 64M.

The option is -shm="xxx" where xxx is the size in bytes using k,m,g
notation.

Docker-DCO-1.0-Signed-off-by: Julien Vermillard jvermillar@sierrawireless.com (github: jvermillard)

@jvermillard jvermillard mentioned this pull request Jan 8, 2014
@vieux
Copy link
Contributor

vieux commented Jan 8, 2014

LGTM

@creack creack mentioned this pull request Jan 8, 2014
@SvenDowideit
Copy link
Contributor

mmm, @jvermillard could you please update the cli.rst documentation with your new option too?

@jvermillard
Copy link
Author

@SvenDowideit done

@creack creack mentioned this pull request Jan 8, 2014
@SvenDowideit
Copy link
Contributor

docs LGTM :) and i know someone who will want to use this (with a very large number)

doc
@metalivedev @kencochrane @jamtur01

@jvermillard
Copy link
Author

my goal here is to run oracle xe 11g, which need 2Gbytes of SHM (or it refuses to start)

@corporate-gadfly
Copy link

my goal here is to run oracle xe 11g, which need 2Gbytes of SHM (or it refuses to start)

I would be interested in the Dockerfile for that project.

@jvermillard
Copy link
Author

[OFF-TOPIC] @corporate-gadfly you can't do it with a dockerfile, because you need -privileged option for running the oracle installer
The simple way is to run a centos image (with -priviliged option) and rpm -i the oracle xe RPM, be sure to fix the container hostname, oracle is picky about it.

@jvermillard
Copy link
Author

ping? do you need extra modification for merging the PR?

@unclejack
Copy link
Contributor

@jvermillard Can you rebase, please?

This will require reviewing again after rebasing because PR #3580 was merged.

@jvermillard
Copy link
Author

rebase done

@jvermillard
Copy link
Author

bumped signoff dco version

@@ -1009,6 +1009,7 @@ image is removed.
-n, --networking=true: Enable networking for this container
-p, --publish=[]: Map a network port to the container
--rm=false: Automatically remove the container when it exits (incompatible with -d)
-shm="65536k": /dev/shm size (format: <number><optional unit>, where unit = b, k, m or g)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be --shm=... ? (two dashes)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok let me fix that

Added a "docker run" option for sizing /dev/shm which is actually
hardcoded to 64M.

The option is -shm="xxx" where xxx is the size in bytes using k,m,g
notation.

Docker-DCO-1.1-Signed-off-by: Julien Vermillard <jvermillar@sierrawireless.com> (github: jvermillard)
@unclejack
Copy link
Contributor

@jvermillard Some tests are failing

-- FAIL: TestLXCConfig (0.00 seconds)
        lxc_template_unit_test.go:49: template: lxc:75:80: executing "lxc" at <.Config.Shm>: can't evaluate field Shm in type []string
--- FAIL: TestCustomLxcConfig (0.00 seconds)
        lxc_template_unit_test.go:82: template: lxc:75:80: executing "lxc" at <.Config.Shm>: can't evaluate field Shm in type []string
FAIL
exit status 1
FAIL    github.com/dotcloud/docker/execdriver/lxc       0.016s

@jvermillard
Copy link
Author

weird :/ was working before the rebase. I probably missed something while rebasing, I'll check that

@jvermillard
Copy link
Author

ok the way lxc is configured totally changed with PR #3580 so I need to rewrite my whole patch.
I'll try to find time next week.

@crosbymichael
Copy link
Contributor

@jvermillard We talked on IRC so I am going to close this for now until we finish the changes to the exec drivers or you will be forever rebasing until we are finished. We will keep this in mind when designing the api.

@jwerak
Copy link

jwerak commented Nov 3, 2014

Is there any thread where I could watch progress on setting /dev/shm size for docker?

@rongearley
Copy link

I'm using centos 6.6 and need -shm support. Didn't see it in the help so I imagine it hasn't made its way to this release. Currently using docker 1.5. Please help - really need more control of sizing /dev/shm.

@oren-yowza
Copy link

Any update on this PR?
Would be happy to control the shared memory size available inside a docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants