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

nsoffer at redhat.com nsoffer at redhat.com
Mon Sep 21 15:06:27 UTC 2015


Nir Soffer has posted comments on this change.

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


Patch Set 23: Code-Review-1

(2 comments)

Last issue

https://gerrit.ovirt.org/#/c/45738/23/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 625:         self._poller.close()
Line 626: 
Line 627: 
Line 628: _ANY_CPU = ["0-%d" % (os.sysconf('SC_NPROCESSORS_ONLN') - 1)]
Line 629: _USING_CPU_AFFINITY = config.get('vars', 'cpu_affinity') != ""
We have different ways to tell if we are using cpu affinity.

* Here: cpu_affinity != ""
* vdsm: cpu_affinity and cpu_set

Let make it use the same logic, so we don't add taskset to all calls for no reason.
Line 630: 
Line 631: 
Line 632: def execCmd(command, sudo=False, cwd=None, data=None, raw=False,
Line 633:             printable=None, env=None, sync=True, nice=None, ioclass=None,


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

Line 236:         return
Line 237: 
Line 238:     cpu_set = frozenset(int(cpu.strip()) for cpu in cpu_affinity.split(","))
Line 239:     if not cpu_set:
Line 240:         return
Is this possible?
Line 241: 
Line 242:     log = logging.getLogger('vds')
Line 243:     log.info('VDSM will run with cpu affinity: %s', cpu_set)
Line 244: 


-- 
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: 23
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: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list