-
Notifications
You must be signed in to change notification settings - Fork 9
Description
CPU usage is high when deploying to private vcloud-director environment (e.g. 80% CPU usage when deploying 4 VMs concurrently, using 4 separate calls to createNodesInGroup, but probably (?) sharing the same ComputeContext for all of them).
Doing some light-weight profiling, it looks like deserializing the vCD messages is expensive, particularly when querying for lots of information - e.g. for all vApp Templates, or all VMs, and then for each of those independently.
e.g. to get all vApp Templates, we made 58 consecutive GET calls (two per vApp Template - one with the suffix /ovf). Each call returned approx 90 lines of XML (which we logged at debug) - taking 97 seconds in total.
Similarly we made 51 sequential calls to get each individual vApp (230 lines of XML each) - taking 32 seconds in total.
It seems we are listing all vApps because of the call to org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames, from BaseComputeService.createNodesInGroup. Can we avoid this?
Are we caching the vApp Templates anywhere in the ComputeService to avoid repeated calls?