Bug 1264187 - ioprocess should set its cpu affinity
ioprocess should set its cpu affinity
Product: ovirt-distribution
Classification: oVirt
Component: ioprocess (Show other bugs)
Unspecified Unspecified
unspecified Severity high (vote)
: ovirt-3.6.1
: ioprocess-0.15.0
Assigned To: Oved Ourfali
Petr Kubica
Depends On:
  Show dependency treegraph
Reported: 2015-09-17 15:02 EDT by Nir Soffer
Modified: 2016-02-18 06:00 EST (History)
6 users (show)

See Also:
Fixed In Version: ioprocess-0.15.0-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-18 06:00:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
oourfali: ovirt‑3.6.z?
rule-engine: planning_ack?
oourfali: devel_ack+
pstehlik: testing_ack+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 47626 None None None Never

  None (edit)
Description Nir Soffer 2015-09-17 15:02:03 EDT
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.
Comment 1 Red Hat Bugzilla Rules Engine 2015-10-19 06:53:03 EDT
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.
Comment 2 Yaniv Lavi 2015-10-29 08:34:10 EDT
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.
Comment 4 Petr Kubica 2016-02-11 05:31:31 EST
Verified in ioprocess-0.15.0-5
#ps auxf
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

Note You need to log in before you can comment on or make changes to this bug.