[ovirt-devel] [VDSM] Profiling results - 144 cores, 144 vms
Francesco Romani
fromani at redhat.com
Thu Feb 18 07:58:15 UTC 2016
----- Original Message -----
> From: "Nir Soffer" <nsoffer at redhat.com>
> To: "devel" <devel at ovirt.org>, "Francesco Romani" <fromani at redhat.com>, "Eldad Marciano" <emarcian at redhat.com>,
> "Vinzenz Feenstra" <vfeenstr at redhat.com>, "Dan Kenigsberg" <danken at redhat.com>, "Piotr Kliczewski"
> <pkliczew at 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
More information about the Devel
mailing list