Red Hat Bugzilla – Bug 1264187
ioprocess should set its cpu affinity
Last modified: 2016-02-18 06:00:48 EST
Description of problem:
Vdsm is going to add cpu-affinity configuration, pinning vdsm to certain
cpus. Most likely, vdsm will be configured to run on single cpu, as
this much more efficient on machines with many cpus (see bug 1247075).
When vdsm is configured to use cpu-affinity, it reset the cpu affinity
of child processes, so they can run on any cpu, which may be more
efficient for the child process, or for the system, specially when there
are many cpus, and vdsm is overloaded.
Since ioprocess is not started from vdsm, but from its own python
library, vdsm cannot reset the cpu-affinity of ioprocess, and it run
with the same cpu-affinity as vdsm.
Here is an example run showing this issue. Vdsm was configured with
"cpu_affinity = 1", pinning to the second cpu.
# ps auxf
vdsm 4608 /usr/bin/python /usr/share/vdsm/vdsm
vdsm 5164 \_ /usr/libexec/ioprocess
vdsm 5171 \_ /usr/libexec/ioprocess
# taskset -p 4608
pid 4608's current affinity mask: 2
# taskset -p 5164
pid 5164's current affinity mask: 2
# taskset -p 5171
pid 5171's current affinity mask: 2
We like to reset the cpu affinity of ioprocess so it can run on any cpu.
Vdsm cpu affinity is going to be backported to ovirt 3.5, so we need this
feature in fedora 21 and 22.
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
In oVirt testing is done on single release by default. Therefore I'm removing the 4.0 flag. If you think this bug must be tested in 4.0 as well, please re-add the flag. Please note we might not have testing resources to handle the 4.0 clone.
Verified in ioprocess-0.15.0-5
vdsm 13866 /usr/bin/python /usr/share/vdsm/vdsm
vdsm 14601 \_ /usr/libexec/ioprocess --read-pipe-fd 54 --write-pipe-fd 53 --max-threads 10 --max-queued-requests 10
# taskset -p 13866
pid 13866's current affinity mask: 2
# taskset -p 14601
pid 14601's current affinity mask: ff