Change in vdsm[master]: scale: limit cpu usage using cpu-affinity

ybronhei at redhat.com ybronhei at redhat.com
Thu Sep 17 07:29:40 UTC 2015


Yaniv Bronhaim has posted comments on this change.

Change subject: scale: limit cpu usage using cpu-affinity
......................................................................


Patch Set 15:

(3 comments)

added few replies - please do the change and work with a wrapper, it won't require the cpopen dependency which I much prefer

https://gerrit.ovirt.org/#/c/45738/15/tests/tasksetTests.py
File tests/tasksetTests.py:

Line 68:         self.assertEqual(taskset.get(self.proc.pid), cpu_list)
Line 69: 
Line 70:     def test_set_from_child(self):
Line 71: 
Line 72:         cpu_list = ['0']
> See bellow the 2 tests for bad input, I think they are enough. There is no 
oh, not a fail cases, only test once the option of pinning the process for more than one cpu, like ['0','4'] - is it possible? I'm curious if it works..
Line 73: 
Line 74:         def _run_helper():
Line 75:             # avoid race on startup: first do taskset, then notify
Line 76:             taskset.set(os.getpid(), cpu_list)


https://gerrit.ovirt.org/#/c/45738/15/vdsm.spec.in
File vdsm.spec.in:

Line 120: Requires: iproute >= 3.10.0
Line 121: Requires: python-netaddr
Line 122: Requires: python-inotify
Line 123: Requires: python-argparse
Line 124: Requires: python-cpopen >= 1.4
> Since this add new feature, 1.3.3 (bug fix release) does not seems appropri
until we don't have build for that better to use TBD
Line 125: Requires: python-ioprocess >= 0.14
Line 126: Requires: python-pthreading >= 0.1.3-3
Line 127: Requires: python-six
Line 128: Requires: python-requests


https://gerrit.ovirt.org/#/c/45738/15/vdsm/vdsm
File vdsm/vdsm:

Line 255:                          "(stderr: %s). Verify sudoer rules configuration" %
Line 256:                          (stderr))
Line 257: 
Line 258: 
Line 259: def _setCpuAffinity():
> two underscores (__) sign global function? Never heard of this convention. 
you can do it in separate patch, but for now keep the file standards ... two underscores for private global functions
Line 260:     cpu_affinity = config.get('vars', 'cpu_affinity')
Line 261:     if cpu_affinity:
Line 262:         cpu_list = [cpu.strip() for cpu in cpu_affinity.split(',')]
Line 263:         taskset.set(os.getpid(), cpu_list, all_tasks=True)


-- 
To view, visit https://gerrit.ovirt.org/45738
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f7f68d65eddb5a21afbc3809ea79cd1dee67984
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yaniv Kaul <ykaul at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list