Dan Kenigsberg has submitted this change and it was merged. Change subject: scale: limit cpu usage using cpu-affinity ......................................................................
scale: limit cpu usage using cpu-affinity To reduce the impact of the GIL, we want to pin VDSM threads to few cores, maybe just one. Initial results using taskset manually provided very interesting results (more details in https://bugzilla.redhat.com/1247075): VDSM was tested while running ~100 idle VMs, pinning vdsmd to less and less cores, down to just one. The load changed in an impressive way, started from fluctuating around 1000-2500% (no pinning) down to average around 30%, rarely peaks close to 100% (pinned to one core). The user can configure using vdsm.conf the cpu cores on which VDSM should run on. If nothing is specified, VDSM behaves as before and uses any CPU core. We need a patch which is simple to backport down to 3.5, so we use taskset just before the start of the main daemon to set VDSM cpu affinity, and we start any child process using taskset to remove VDSM's cpu affinity and allow the child process to use any cpu. taskset is part of util-linux, so no additional dependency is needed. Note: ioprocess needs to be patched to reset its cpu affinity. Tracked in https://bugzilla.redhat.com/1264187 Change-Id: I3f7f68d65eddb5a21afbc3809ea79cd1dee67984 Bug-Url: https://bugzilla.redhat.com/1247075 Backport-To: 3.6 Backport-To: 3.5 Signed-off-by: Francesco Romani <[email protected]> Reviewed-on: https://gerrit.ovirt.org/45738 Continuous-Integration: Jenkins CI Reviewed-by: Nir Soffer <[email protected]> Reviewed-by: Dan Kenigsberg <[email protected]> --- M configure.ac M debian/vdsm-python.install M lib/vdsm/Makefile.am M lib/vdsm/cmdutils.py M lib/vdsm/config.py.in M lib/vdsm/constants.py.in A lib/vdsm/taskset.py M lib/vdsm/utils.py M tests/Makefile.am M tests/cmdutilsTests.py A tests/tasksetTests.py M tests/testlib.py M tests/utilsTests.py M vdsm.spec.in M vdsm/vdsm 15 files changed, 348 insertions(+), 1 deletion(-) Approvals: Nir Soffer: Looks good to me, but someone else must approve Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified -- To view, visit https://gerrit.ovirt.org/45738 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f7f68d65eddb5a21afbc3809ea79cd1dee67984 Gerrit-PatchSet: 26 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Ido Barkan <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Polednik <[email protected]> Gerrit-Reviewer: Martin Sivák <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
