c# - Remote WMI query slow -
i'm working on program queries 3 different servers in order cpu , logicaldisk information.
each server query returns me values in 6 15 seconds (depending on server). takes total of 31 seconds values (15 sec first server, 6 second , 10 third).
i tried multi thread each query, reduced execution time of 1 second each server, don't think it's solution.
i tried run queries directly powershell in servers:
first server : took 10 seconds (instead of 15) retrieve informations
second server : took 10 seconds (like when remotely) retrieve informations
third server ) took ~1 second (instead of 6)
here queries:
select loadpercentage win32_processor select size, freespace win32_logicaldisk
my question is: there on servers make queries easier ? tried desactivate firewall , antivirus.
ps: i'm querying windows 2003 r2 server, win xp pro , win 7 server, each in same domain local computer.
perhaps might speed whole thing using cim instead of wmi.
here can find performance comparison: http://community.spiceworks.com/topic/332657-powershell-cmdlet-performance-get-wmiobject-vs-get-ciminstance
of course can specific ciminstance in c#, too: https://msdn.microsoft.com/en-us/library/dn313201(v=vs.85).aspx
Comments
Post a Comment