Hi, Folks,
In the vSphere_SDK provisioning module, I have noticed that the 
`_get_file_info` subroutine is really slow -- at least it is on my system.

For example, this is called when looking for *.vmx files on the datastore of 
running VMs. I would expect the query to take only a few seconds, but it is 
usually several minutes before the query returns.

I have done some testing and found that the sluggishness is related to the 
'query' parameter given to the HostDatastoreBrowserSearchSpec constructor. That 
parameter is an array of different types of objects to query. The current code 
appears to be remarkably comprehensive (around lines 2474 - 2525 of 
vSphere_SDK.pm):

query => [
  VmDiskFileQuery->new(...),
  FileQuery->new(),
  FloppyImageFileQuery->new(),
  FolderFileQuery->new(),
  IsoImageFileQuery->new(),
  VmConfigFileQuery->new(),
  VmLogFileQuery->new(),
  VmNvramFileQuery->new(),
  VmSnapshotFileQuery->new()]

I have found that, by commenting out everything but VmDiskFileQuery, FileQuery 
and FolderFileQuery, I reduce the query time down to a few seconds (instead of 
minutes). Do any of you know why I would want vcld to query all of those other 
object types?

Thanks!
Aaron C



--
Aaron Coburn
Academic Technology Services, Amherst College
[email protected]<mailto:[email protected]>







Reply via email to