----- Original Message -----
From: "Nir Soffer" <nsoffer(a)redhat.com>
To: "devel" <devel(a)ovirt.org>, "Francesco Romani"
<fromani(a)redhat.com>, "Eldad Marciano" <emarcian(a)redhat.com>,
"Vinzenz Feenstra" <vfeenstr(a)redhat.com>, "Dan Kenigsberg"
<danken(a)redhat.com>, "Piotr Kliczewski"
<pkliczew(a)redhat.com>
Sent: Thursday, February 18, 2016 12:38:44 AM
Subject: [VDSM] Profiling results - 144 cores, 144 vms
Hi all,
I noticed that Eldad posted profiling result from 144 cores / 144 vms run:
See
https://bugzilla.redhat.com/attachment.cgi?id=1128028
Looking at the profile bellow:
2. Creating DomainDescriptor seems expensive - is this xml.minidom?
Let's look at DomainDescriptor's __init__
class DomainDescriptor(object):
def __init__(self, xmlStr):
self._xml = xmlStr
self._dom = xml.dom.minidom.parseString(xmlStr)
self._devices = self._first_element_by_tag_name('devices')
self._devices_hash = hash(self._devices.toxml()
if self._devices is not None else '')
so we parse using the slow minidom _and_ we do toxml() on a subset of the xml tree.
Both operations are expensive (and quite memory expensive).
Milan is already working on moving from minidom to etree, I think we are on good track
here for 4.0.
--
Francesco Romani
RedHat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani