S
S
semki0962017-05-04 16:28:36
ubuntu
semki096, 2017-05-04 16:28:36

How to limit docker container resources?

I register docker run -d m=256mAnd I get the error "Your kernel does not support swap limit capabilities, memory limited without swap
" But there are docker folders in cgroup, for example /sys/fs/cgroup/memory/docker I suspect that the memory limit can be set there too, but I want to do it in real time.
What could be my problem with "Your kernel does not support swap limit capabilities, memory limited without swap" error?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
archisova, 2019-05-14
@archisova

I don’t know how relevant it is yet or not, but I will offer my own answer for history.
First , you need to check if your OS (Linux) supports the containerization mechanism: cgroups . Now almost all LINUX distributions support this mechanism. You can read more about this mechanism here .
Secondly , try specifying additional OS startup options in the system bootloader, namely:
Add (or update) the /etc/default/grubfollowing entry in the file:
Reboot required:
Taken from here .

E
Erelecano Oioraen, 2017-05-04
@Erelecano

> What could be my problem with "Your kernel does not support swap limit capabilities, memory limited without swap" error?
Your problem is that your kernel does not support this limitation. Or that you don't know how to google.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question