[Libvirt-cim] CIMTest run performance

Eduardo Lima (Etrunko) eblima at linux.vnet.ibm.com
Fri May 27 15:28:23 UTC 2011


Hello all,

I had been trying to set up cimtest to work on my machine for a couple 
of days without success. So yesterday I started to dig the code and 
found that every command is sent via ssh, even if the test is supposed 
to run locally.

The reason of cimtest not working was exactly that did not have the ssh 
keys set up properly. By fixing that configuration, I was able to make 
the test work as expected. :)

But I was still intrigued with the fact that every command is sent via 
ssh, thus taking cimtest a very very long time to complete. So I hacked 
a simple patch to try to workaround this issue:

=====
diff -r d6951b8799a8 lib/VirtLib/utils.py
--- a/lib/VirtLib/utils.py	Wed May 18 13:49:05 2011 -0400
+++ b/lib/VirtLib/utils.py	Fri May 27 07:42:23 2011 -0700
@@ -33,7 +33,8 @@

  def run_remote(ip, cmd):

-    cmd = 'ssh %s -i %s root@%s "%s"' % (SSH_PARMS, SSH_KEY, ip, cmd)
+    if ip not in ["localhost", "127.0.0.1"]:
+        cmd = 'ssh %s -i %s root@%s "%s"' % (SSH_PARMS, SSH_KEY, ip, cmd)
      return commands.getstatusoutput(cmd)

  def copy_remote(ip, local, remote='/tmp'):
=====

As you can see, it is a quick check if 'ip' is neither localhost nor 
127.0.0.1, which only in that case the command is sent via ssh.

Note that this patch triggers some other issues, which I hope to be able 
to fix soon. But there is already a *huge increase* in the performance. 
I have used the most simpler and probably not the most correct measure:

$ time && cimtest && time

With the following results:

Without patch:
Fri May 27 06:46:28 PDT 2011
Fri May 27 07:16:17 PDT 2011

With patch:
Fri May 27 07:29:06 PDT 2011
Fri May 27 07:34:50 PDT 2011

 From 30 minutes down to 6!

_BUT_, I can't really tell if it is actually intended that everything 
runs with ssh. Taking a look on the test results, it is noticeable that 
cimtest behaves in a different way, as follows.

Without path:
  FAIL      : 18
  XFAIL     : 5
  SKIP      : 6
  PASS      : 158
  -----------------
  Total     : 187
=================================================
   FAIL Test Summary:
   ComputerSystem - 04_defineStartVS.py: FAIL
   ComputerSystemMigrationJobIndication - 
01_csmig_ind_for_offline_mig.py: FAIL
   ElementSettingData - 01_forward.py: FAIL
   HostSystem - 02_hostsystem_to_rasd.py: FAIL
   HostSystem - 04_hs_to_EAPF.py: FAIL
   KVMRedirectionSAP - 02_ipv6_support.py: FAIL
   Profile - 02_profile_to_elec.py: FAIL
   Profile - 04_verify_libvirt_cim_slp_profiles.py: FAIL
   SystemDevice - 01_forward.py: FAIL
   VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL
   VirtualSystemManagementService - 19_definenetwork_ers.py: FAIL
   VirtualSystemManagementService - 20_verify_vnc_password.py: FAIL
   VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL
   VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL
   VirtualSystemMigrationService - 
08_remote_restart_resume_migration.py: FAIL
   VirtualSystemSettingDataComponent - 01_forward.py: FAIL
   VirtualSystemSettingDataComponent - 02_reverse.py: FAIL
   VSSD - 04_vssd_to_rasd.py: FAIL

   =================================================
   XFAIL Test Summary:
   ComputerSystem - 32_start_reboot.py: XFAIL
   SwitchService - 01_enum.py: XFAIL
   VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL
   VirtualSystemManagementService - 28_definesystem_with_vsi_profile.py: 
XFAIL
   VirtualSystemManagementService - 30_dynamic_disk_mod.py: XFAIL

   =================================================
   SKIP Test Summary:
   ComputerSystem - 02_nosystems.py: SKIP
   LogicalDisk - 02_nodevs.py: SKIP
   VirtualSystemMigrationService - 01_migratable_host.py: SKIP
   VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
   VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
   VSSD - 02_bootldr.py: SKIP

With patch:
  FAIL      : 15
  XFAIL     : 5
  SKIP      : 10
  PASS      : 157
  -----------------
  Total     : 187
=================================================
FAIL Test Summary:
ComputerSystem - 04_defineStartVS.py: FAIL
ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL
ElementSettingData - 01_forward.py: FAIL
HostSystem - 02_hostsystem_to_rasd.py: FAIL
HostSystem - 04_hs_to_EAPF.py: FAIL
KVMRedirectionSAP - 02_ipv6_support.py: FAIL
Profile - 02_profile_to_elec.py: FAIL
Profile - 04_verify_libvirt_cim_slp_profiles.py: FAIL
SystemDevice - 01_forward.py: FAIL
VirtualSystemManagementService - 06_addresource.py: FAIL
VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL
VirtualSystemManagementService - 20_verify_vnc_password.py: FAIL
VirtualSystemSettingDataComponent - 01_forward.py: FAIL
VirtualSystemSettingDataComponent - 02_reverse.py: FAIL
VSSD - 04_vssd_to_rasd.py: FAIL

=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
SwitchService - 01_enum.py: XFAIL
VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL
VirtualSystemManagementService - 28_definesystem_with_vsi_profile.py: XFAIL
VirtualSystemManagementService - 30_dynamic_disk_mod.py: XFAIL

=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP
VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: SKIP
VSSD - 02_bootldr.py: SKIP


I would really appreciate comments from the experts on this issue. IMHO, 
it is something really worthy and if there are any tests that are 
required to run remotely, I could work on a proper fix to try to achieve 
the same results.

Best regards, Etrunko

-- 
Eduardo de Barros Lima
Software Engineer, Open Virtualization
Linux Technology Center - IBM/Brazil
eblima at br.ibm.com




More information about the Libvirt-cim mailing list