Page 1 of 1
Can't set CPU limit on a container
Posted: 03 Jan 2023, 03:26
by XFNeo
Can't set CPU limit on a container
Code: Select all
docker run -it --rm --cpus 1 nginx
docker: Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU CFS scheduler or the cgroup is not mounted.
Re: Can't set CPU limit on a container
Posted: 18 Jan 2023, 02:54
by XFNeo
Up
Re: Can't set CPU limit on a container
Posted: 18 Jan 2023, 20:19
by TMRyan
Thank you for your feedback. We already know this problem.
Re: Can't set CPU limit on a container
Posted: 27 Jan 2023, 01:11
by XFNeo
TMRyan wrote: ↑18 Jan 2023, 20:19
Thank you for your feedback. We already know this problem.
I'm happy that you know about this) But when will it be fixed?
Re: Can't set CPU limit on a container
Posted: 24 Mar 2023, 18:26
by XFNeo
Have you fixed this issue?
Re: Can't set CPU limit on a container
Posted: 27 Mar 2023, 14:56
by TMnorah
You can use the following command to set the maximum use of 1 core CPU
Code: Select all
docker container run --name nginx2 -d --cpus 1 nginx
![Image](https://forum.terra-master.com/en/ext/dmzx/imageupload/img-files/3872/90/c2/d8865f885bad253cb935bde48b56cd9e.png)
Re: Can't set CPU limit on a container
Posted: 02 Apr 2023, 19:40
by XFNeo
The same issue:
Code: Select all
# docker container run --name nginx2 -d --cpus 1 nginx
docker: Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU CFS scheduler or the cgroup is not mounted.
See 'docker run --help'.
Re: Can't set CPU limit on a container
Posted: 20 Apr 2023, 02:55
by XFNeo
After update to 5.1.31 cpu limit in docker works.
Thx