Change in vdsm[master]: fileSD: Optimize getAllVolumes on file storage
danken at redhat.com
danken at redhat.com
Tue Feb 17 09:56:28 UTC 2015
Dan Kenigsberg has submitted this change and it was merged.
Change subject: fileSD: Optimize getAllVolumes on file storage
......................................................................
fileSD: Optimize getAllVolumes on file storage
The previous implementation was using O(N^2) search to detect template
images and volumes. When working with storage domain with large number
of disks created from the same template, getAllVolumes becomes very
slow, delaying flows such as vm startup and recovery.
This patch reimplements getAllVolumes using O(N) search, cutting the
time to process 5000 volume paths from 9 to 0.065 seconds.
Profiling on scale setup show that getAllVolume cpu time per call
dropped from 44 to 1.3 seconds, and the total cpu time used for
preparing 20 images drop from 884 to 28 seconds.
Before this patch:
ncalls tottime percall cumtime percall filename:lineno(function)
...
20 0.153 0.008 884.109 44.205 hsm.py:3188(HSM.prepareImage)
20 7.242 0.362 883.014 44.151 fileSD.py:414(NfsStorageDomain.getAllVolumes)
214840 866.080 0.004 866.080 0.004 fileSD.py:444(<genexpr>)
...
With this patch:
ncalls tottime percall cumtime percall filename:lineno(function)
...
20 0.128 0.006 28.302 1.415 hsm.py:3188(HSM.prepareImage)
20 10.391 0.520 26.579 1.329 fileSD.py:415(NfsStorageDomain.getAllVolumes)
...
Change-Id: Idc19ce272b7e0b9c91d2f90aa46b5ddd21d69ece
Bug-Url: https://bugzilla.redhat.com/1179950
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/36593
Reviewed-by: Allon Mureinik <amureini at redhat.com>
Reviewed-by: Adam Litke <alitke at redhat.com>
Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M tests/fileSDTests.py
M vdsm/storage/fileSD.py
2 files changed, 50 insertions(+), 30 deletions(-)
Approvals:
Nir Soffer: Verified
Adam Litke: Looks good to me, but someone else must approve
Federico Simoncelli: Looks good to me, but someone else must approve
Allon Mureinik: Looks good to me, but someone else must approve
Dan Kenigsberg: Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/36593
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc19ce272b7e0b9c91d2f90aa46b5ddd21d69ece
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at gmail.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list