Closed rfyiamcool closed 6 months ago
That's normal, --cpus
configures a CFS quota, not a cpuset, so by default lxcfs will not do anything with that. If you had used --cpuset-cpus
instead, it'd have worked.
Starting LXCFS with --enable-cfs
should also make things behave better in your case.
summary
can't get expected cpuinfo in docker, still get /proc/cpuinfo of the node in container.
dep versions
System OS
ubuntu: 24:04
lxc version
5.0.0
lxc install method
lxc status
docker version
docker run test
limit container to set memory 256m and 2 cpu core, i can get right meminfo in container, but get wrong unlimited cpuinfo. 😅 I wnat to get 2 cpu core only in container.
test1
test2