Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory limit on ubuntu 12.04 #1827

Closed
matthewmueller opened this issue Sep 8, 2013 · 6 comments
Closed

memory limit on ubuntu 12.04 #1827

matthewmueller opened this issue Sep 8, 2013 · 6 comments

Comments

@matthewmueller
Copy link
Contributor

When I try to set a memory limit on ubuntu 12.04, I keep getting this message:

WARNING: Your kernel does not support memory swap capabilities. Limitation discarded.

Are memory limits supported on 12.04?


I just upgraded and rebooted the kernel. Here's that information:

Linux version 3.8.0-30-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #44~precise1-Ubuntu SMP Fri Aug 23 18:32:41 UTC 2013

Finally I'm running, docker 0.6.1.

@jpetazzo
Copy link
Contributor

jpetazzo commented Sep 9, 2013

You need a special boot option to enable memory and swap accounting on Debian/Ubuntu kernels.

This is detailed in the Kernel Requirements documentation page.

Let us know if that works for you!

@crosbymichael
Copy link
Contributor

@matthewmueller Were you able to enable the feature?

@matthewmueller
Copy link
Contributor Author

Hey thanks for the help. I've been on ubuntu 13.04 lately, so this hasn't been a problem. Let me try on my 12.04 VM tonight.

On Sep 13, 2013, at 10:26 AM, Michael Crosby notifications@github.com wrote:

@matthewmueller Were you able to enable the feature?


Reply to this email directly or view it on GitHub.

@judeKim
Copy link

judeKim commented Sep 17, 2013

I also have this problem on my ubuntu 12.04(LTS). kernel version is

3.8.0-30-generic #44~precise1-Ubuntu SMP

I had applied configuration for grub( Kernel Requirements ) but It was not work.

@unclejack
Copy link
Contributor

The required steps to take to enable memory swap limits are documented here: Kernel requirements.

If you're still running into this issue, please comment on this issue and I will open it again. I'm closing it now.

@ghost
Copy link

ghost commented Nov 21, 2013

observation.... even after you follow the kernel requirements steps, lxc-checkconfig will still show you

Cgroup memory controller: missing

however if you dig at the cgroup level it does appear the mem/swap accounting is working.

root@dockerbm1:/sys/fs/cgroup/memory# cat ./memory.memsw.limit_in_bytes
9223372036854775807

before applying the kernel requirement steps (update /etc/default/grub, update-grub, reboot) I was getting an error about unsupported operation when catting swap related controls.

maybe the missing controller output is an issue in the lxc-checkconfig command.

@nanobeep
Copy link

nanobeep commented Apr 8, 2014

The link has changed for the "Kernel requirements" and is now: http://docs.docker.io/en/latest/installation/ubuntulinux/#memory-and-swap-accounting

(The old link in the previous comments above gives a 404 error currently)

For an example implementation, see Phusion's Open Vagrant Boxes: https://github.com/phusion/open-vagrant-boxes/blob/master/definitions/ubuntu-12.04.3-amd64-vbox/memory_swap_accounting.sh

trebonian pushed a commit to trebonian/docker that referenced this issue Jun 3, 2021
Fixes moby#1827

Signed-off-by: Jacob Wen <jian.w.wen@oracle.com>
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

No branches or pull requests

6 participants