docker: docker run --cpuset is not having any effect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Chris J Arges |
Bug Description
---Problem Description---
docker: cpuset resouce allocaton on a container shows/lists all CPU of VM host
---uname output---
root@8a2d293ba3
Machine Type = Power 8 / PowerKVM
---Steps to Reproduce---
1 - Install docker 1.4 developer build on PowerKVM Ubuntu 15.04 LE geust
ftp://ftp.
2 - Create vivid image using debootstrap
3 - Run a container using below command with cpuset=6,7
root@dockerbase:~# docker run -it --cpuset=6,7 vivid-cpuset-stress /bin/bash
4 - Inside container check for : grep processor /proc/cpuinfo
root@06b22766d6
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
processor : 8
processor : 9
processor : 10
processor : 11
processor : 12
processor : 13
processor : 14
processor : 15
root@06b22766d6
It does list all CPUs of guest VM aka host in this case instead expected 6,7 cpu to be bound to this container.
At host end "cpuset" :
root@dockerbase:~# cat /sys/fs/
6-7
Nish, AFAIK, effective cpus was relevant only for unified hierarchy... they used to set effective_cpus= cpuset.cpus .. but will investigate more on this..
Uh, I think this got fixed upstream, can we check? Maybe build an Ubuntu test kernel (this should get auto-pulled in in some future build, due to -stable):
79063bffc81f826
-Nish
I did some more investigation and as Nish pointed there were some bugs that got fixed in upstream.
Root cause: cgroup.
cgroup.
if we set 0 to clone_children it should work properly.
so better if we backport below patch (if not already to fix the current problem)
1. 790317e1b266c77
2. 79063bffc81f826
Canonical,
both the above patches are targetted for 3.19-stable (in fact 3.17+), but given the possible miss on schedule between the upstream 3.19-stable releases and 15.04 kernel freeze, can we please manually include them until they are present in -stable? Without the changes, the cpuset cgroups are rather broken.
-Nish
tags: | added: architecture-all bugnameltc-122528 severity-medium targetmilestone-inin--- |
affects: | ubuntu → linux (Ubuntu) |
tags: |
added: targetmilestone-inin1504 removed: targetmilestone-inin--- |
tags: | added: kernel-da-key |
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Chris J Arges (arges) |
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Released |
------- Comment (attachment only) From <email address hidden> 2015-03-24 01:04 EDT-------