From c290fa1c4b7b280a26cbf742ab109fa2db2d10a3 Mon Sep 17 00:00:00 2001 From: "\"Dube, Lutz\"" Date: Fri, 23 Jul 2010 17:34:35 +0100 Subject: tools/xend: Fix performance of xend with more than 10000 FC device paths On server startup xend start or a later xend restart needs approx. 30 min to start/restart. Without attached FC devices xend start/restart needs only some seconds. server type: Fujitsu Primergy RX600-S5 The time gets lost in xen/xend/XendNode.py line 329 while calling vscsi_util.get_all_scsi_device(). 329 for pscsi_record in vscsi_util.get_all_scsi_devices(): 330 scsi_id = pscsi_record['scsi_id'] 331 if scsi_id: 332 saved_HBA_uuid = None I think, in most cases we don't need all the PSCSI devices registered in xend, but only a few of it. So a good solution for this perforamce issue is to scan only the SCSI device paths we need, controlled by a new option in xend-config.sxp. I have made a patch to allow specification of scsi devices we need in xend in the config file xend-config.sxp. The new options pscsi-device-mask expects a list of device ids oder partial device ids like the option of lsscsi, e.g. (pscsi-device-mask (': "Well done" Committed-by: Ian Jackson --- tools/examples/xend-config.sxp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/examples') diff --git a/tools/examples/xend-config.sxp b/tools/examples/xend-config.sxp index b7e98f464d..0896a27645 100644 --- a/tools/examples/xend-config.sxp +++ b/tools/examples/xend-config.sxp @@ -294,3 +294,11 @@ # we have to realize this may incur security issue and we can't make sure the # device assignment could really work properly even after we do this. #(pci-passthrough-strict-check yes) + +# If we have a very big scsi device configuration, start of xend is slow, +# because xend scans all the device paths to build its internal PSCSI device +# list. If we need only a few devices for assigning to a guest, we can reduce +# the scan to this device. Set list list of device paths in same syntax like in +# command lsscsi, e.g. ('16:0:0:0' '15:0') +# (pscsi-device-mask ('*')) + -- cgit v1.2.3