xen-org/xen-api — pull request #720 by djs55 (2012-07-02 22:16:33+00:00)
Title: CA-84902: make VM.hard_shutdown lots faster

When lots of VMs are active, VM.hard_shutdown was doing 2 bad things:

1. every VDI.detach/deactivate would write out the whole system storage state 'n' times where 'n' is the number of still-active VDIs
2. every xapi -> xenopsd event registration for task monitoring would fetch all events from the beginning, which produces one event per VM, VBD, VIF and PCI device

This was tested by:

1. 8-way parallel XenAPI start of 300 VMs using an NFS storage driver domain
2. 8-way parallel XenAPI shutdown of 300 VMs using an NFS storage driver domain
3. quicktest: to check VM lifecycle operations are all still working